diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-02-24 15:22:51 -0500 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-02-24 15:22:51 -0500 |
| commit | 959440761a81bc115f4346decc0607079d615b0f (patch) | |
| tree | 2ef6040fbb4ca48dbb6326297bf76788eb6b12e8 /events | |
| parent | 69888042fc3a2d0b92dfdc9fddedeb3f27fed47e (diff) | |
| download | PokeBot-959440761a81bc115f4346decc0607079d615b0f.tar.gz PokeBot-959440761a81bc115f4346decc0607079d615b0f.tar.bz2 PokeBot-959440761a81bc115f4346decc0607079d615b0f.zip | |
DONE DONE ODNE
Diffstat (limited to 'events')
| -rw-r--r-- | events/message.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/events/message.js b/events/message.js index 7efd7ca..db89ca8 100644 --- a/events/message.js +++ b/events/message.js @@ -15,7 +15,7 @@ module.exports = (bot, msg) => { function parseCommand(bot, msg) { let category; - const prefix = 'p:'; + const prefix = 'p,'; if (msg.author.bot) return; if (!msg.content.startsWith(prefix)) return; @@ -26,13 +26,14 @@ function parseCommand(bot, msg) { Array.from(bot.categories.keys()).forEach(i => { const cmds = bot.categories.get(i); if (cmds.includes(command)) category = i; + if (bot.aliases.get(i).has(command)) category = i; }); if (!category) return; if (bot.commands.get(category).has(command)) { cmd = bot.commands.get(category).get(command); } else if (bot.aliases.get(category).has(command)) { - cmd = bot.commands.get(category).get(bot.aliases.get(command)); + cmd = bot.commands.get(category).get(bot.aliases.get(category).get(command)); } if (cmd) { |
