Last active
January 4, 2019 14:43
-
-
Save deanshub/534586721437a3c75722553288f8c127 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import botCommander from './botCommander'; | |
const commandsConfig = [{ | |
name: 'start', | |
regex: /\/start$/, | |
disabled: false, | |
description: 'let the bot help you around', | |
},{ | |
name: 'callback', | |
disabled: false, | |
}]; | |
commandsConfig | |
.filter(command=>!command.disabled) | |
.forEach(command=>{ | |
botCommander.addCommand(command, require(`./commands/${command.name}`)[command.fn||'default']) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment