Command Handler working
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
exports.loadModule = function loadModule (commandH) {
|
||||
console.log('In debug.js');
|
||||
console.log(commandH);
|
||||
const commandH = require('../commandHandler');
|
||||
const bot = require('../botClient').bot;
|
||||
|
||||
exports.loadModule = function loadModule () {
|
||||
commandH.endpoint('^ping test$', (match, message) => {
|
||||
bot.createMessage(message.channel.id, 'hey ho');
|
||||
});
|
||||
commandH.endpoint('^ping test (.*)$', (match, message) => {
|
||||
bot.createMessage(message.channel.id, 'hey ho ' + match[1]);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user