add alias command name

This commit is contained in:
Tutur33
2024-02-17 02:02:17 +01:00
parent 0cde5ff766
commit 8bc2bbb8d8
3 changed files with 15 additions and 0 deletions
+5
View File
@@ -16,6 +16,11 @@ module.exports = (client) => {
delete require.cache[require.resolve(filePath)];
const command = require(filePath);
client.commands.set(command.name, command);
if (command.aliases) {
command.aliases.forEach(alias => {
client.commands.set(alias, command);
});
}
count++;
} catch (error) {
console.error(`Failed to load file: ${filePath}`); // Log any errors