From 52a319a1c06964ac892482c653cbcd30dc3b4c75 Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:36:16 +0300 Subject: [PATCH] Fixed my bots messages --- chatBot/bot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }