oops forgot to change the cooldown warn from msg
This commit is contained in:
parent
c7b87dc4bf
commit
f812359b42
1 changed files with 2 additions and 1 deletions
|
@ -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}`);
|
||||||
|
|
Loading…
Reference in a new issue