mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
fix: Changed command logic to be in property execute instead of run
This commit is contained in:
1 parent
6fdd943e56
commit
2d0df79dac
15 files changed
+18
-15
No files matched your search
@@ -13,13 +13,16 @@ module.exports = {
|
||||
|
||||
const command = client.commands.get(interaction.commandName);
|
||||
if (!command) {
|
||||
logger.warn(`Interaction created but command '${interaction.commandName}' was not found.`);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const inputTime = new Date();
|
||||
|
||||
await interaction.deferReply();
|
||||
await command.run({ interaction, client });
|
||||
await command.execute({ interaction, client });
|
||||
|
||||
const outputTime = new Date();
|
||||
const executionTime = outputTime - inputTime;
|
||||
|
||||
|
||||
Reference in new issue
Block a user