Tweaked to allow usages of command aliases.
This commit is contained in:
@@ -9,7 +9,8 @@ client.on('messageCreate', async message => {
|
||||
const args = message.content.slice(config.prefix.length).trim().split(/ +/);
|
||||
const cmd = args.shift().toLowerCase();
|
||||
if (cmd.length === 0) return;
|
||||
const commands = client.commands.get(cmd);
|
||||
let commands = client.commands.get(cmd)
|
||||
if (!commands) commands = client.commands.get(client.aliases.get(cmd));
|
||||
|
||||
commands.run(client, message, args);
|
||||
})
|
||||
Reference in New Issue
Block a user