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
+5
View File
@@ -14,6 +14,11 @@ module.exports = (client) => {
let command = require(`../commands/${dir}/${file}`);
if (command) {
client.commands.set(command.name, command);
if (command.aliases && Array.isArray(command.aliases)) {
command.aliases.forEach((alias) => {
client.aliases.set(alias, command.name);
});
}
table.addRow(command.name, chalk.green('Loaded'));
} else {
table.addRow(file, chalk.red('Failed'));