mirror of
https://github.com/arthur-pbty/gestion-perso.git
synced 2026-06-11 03:14:24 +02:00
add game js
This commit is contained in:
@@ -14,8 +14,12 @@ module.exports = function loadEvents(client: any, dir: string) {
|
||||
const command = require(filePath);
|
||||
const fileName = file.replace(/\.js|\.ts/g, '');
|
||||
command.name = fileName;
|
||||
const parentDir = path.basename(path.dirname(filePath));
|
||||
command.category = parentDir === 'commands' ? 'other' : parentDir;
|
||||
console.log(command);
|
||||
if (!command.category) {
|
||||
const parentDir = path.basename(path.dirname(filePath));
|
||||
command.category = parentDir === 'commands' ? 'other' : parentDir;
|
||||
}
|
||||
console.log(command);
|
||||
client.commands.set(fileName, command);
|
||||
if (command.aliases) {
|
||||
command.aliases.forEach((alias: string) => {
|
||||
|
||||
Reference in New Issue
Block a user