From 9d71d4cd9fc8356d26fae73e1b954e3ce17eec89 Mon Sep 17 00:00:00 2001 From: Murat <59137982+theMuwat@users.noreply.github.com> Date: Wed, 29 Nov 2023 20:01:04 +0300 Subject: [PATCH] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e9b237d..11adf26 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ client.on('messageCreate', async message => { let command = args.shift().toLowerCase() // Getting the command from args let cmd; if (client.commands.has(command)) cmd = client.commands.get(command) // Checking if typed command is exists - if (cmd) cmd.run(client, message, args) // Running the command if it is exists + if (cmd && cmd.info.enabled) cmd.run(client, message, args) // Running the command if it is exists }) client.on('ready', () => console.log('Bot is ready!')) // Ready Event