diff --git a/chatBot/bot.js b/chatBot/bot.js index cb9162d..663c46c 100644 --- a/chatBot/bot.js +++ b/chatBot/bot.js @@ -19,14 +19,14 @@ async function loadCommands() { for (const file of files) { // Check if the file is a JavaScript file if (file.endsWith('.js')) { - // const commandName = path.basename(file, '.js'); + const commandName = path.basename(file, '.js'); const commandPath = path.join(commandsDir, file); // Dynamically import the command module const { default: commandModule } = await import(commandPath); // Add the command module to the commands object - commands[commandPath] = commandModule; + commands[commandName] = commandModule; } }