mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-04 15:56:42 +02:00
add alias command name
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user