Update index.js
This commit is contained in:
parent
5530c40d58
commit
9d71d4cd9f
2
index.js
2
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user