oops forgot to change the cooldown warn from msg

This commit is contained in:
Emily 2022-12-11 17:22:57 +11:00
parent c7b87dc4bf
commit f812359b42

View file

@ -33,7 +33,7 @@ module.exports = class {
const cooldown = command.cooldown / 1000; const cooldown = command.cooldown / 1000;
const timePassed = Math.floor((currentTime - timestamp) / 1000); const timePassed = Math.floor((currentTime - timestamp) / 1000);
return interaction.reply( return interaction.reply(
`${client.config.emojis.wait} ${message.author.mention}, you need to wait ${cooldown - timePassed} seconds before using this command again.` `${client.config.emojis.wait} <@${interaction.user.id}>, you need to wait ${cooldown - timePassed} seconds before using this command again.`
); );
} else { } else {
client.cooldowns.get(command.name).set(interaction.user.id, new Date()); client.cooldowns.get(command.name).set(interaction.user.id, new Date());
@ -42,6 +42,7 @@ module.exports = class {
}, client.commands.get(command.name).cooldown); }, client.commands.get(command.name).cooldown);
} }
// Try to execute the command, if it fails return error stack and inform the user
try { try {
command.run(client, interaction, data); command.run(client, interaction, data);
client.logger.command(`Ran ${command.name}`); client.logger.command(`Ran ${command.name}`);