Tweaked to allow usages of command aliases.
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user