Tweaked to allow usages of command aliases.

This commit is contained in:
Kwafuri
2024-03-03 09:03:32 +00:00
parent fa0154d0d2
commit 2abeb3d61b
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -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);
})