Update index.js
This commit is contained in:
parent
3317bd0273
commit
90287d8f2c
7
index.js
7
index.js
|
@ -29,7 +29,11 @@ client.on('messageCreate', async message => {
|
|||
|
||||
if (!client.commands.has(commandName)) return;
|
||||
|
||||
message.delete();
|
||||
const deleteDelay = 2000;
|
||||
|
||||
setTimeout(() => {
|
||||
message.delete().catch(console.error);
|
||||
}, deleteDelay);
|
||||
|
||||
try {
|
||||
await client.commands.get(commandName).execute(message, args, MESSAGE_DELETE_TIMEOUT);
|
||||
|
@ -42,5 +46,4 @@ client.on('messageCreate', async message => {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
client.login(process.env.DISCORD_TOKEN);
|
||||
|
|
Loading…
Reference in New Issue