mirror of
https://github.com/arthur-pbty/gestion-perso.git
synced 2026-06-05 22:01:41 +02:00
ad help
This commit is contained in:
@@ -12,7 +12,11 @@ module.exports = function loadEvents(client, dir) {
|
||||
try {
|
||||
delete require.cache[require.resolve(filePath)];
|
||||
const command = require(filePath);
|
||||
client.commands.set(command.name, command);
|
||||
const fileName = file.replace('.js', '');
|
||||
command.name = fileName;
|
||||
const parentDir = path.basename(path.dirname(filePath));
|
||||
command.category = parentDir === 'commands' ? 'other' : parentDir;
|
||||
client.commands.set(fileName, command);
|
||||
if (command.aliases) {
|
||||
command.aliases.forEach(alias => {
|
||||
client.commands.set(alias, command);
|
||||
|
||||
Reference in New Issue
Block a user