add game js

This commit is contained in:
Tutur33
2024-02-25 22:53:16 +01:00
parent 37f02daac3
commit a9d92fbff6
17 changed files with 609 additions and 2 deletions
+6 -2
View File
@@ -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) => {