Drop: Show cooldown times in minutes instead of ms

This commit is contained in:
2022-09-08 12:25:25 +02:00
parent fd209fbbda
commit d8fb5d0a62

View File

@@ -16,7 +16,7 @@ module.exports = {
const cooldowns = await UserUtils.getCooldowns(user); const cooldowns = await UserUtils.getCooldowns(user);
if (cooldowns.dropCooldown > 0 && permissionLevel < 2) { if (cooldowns.dropCooldown > 0 && permissionLevel < 2) {
interaction.reply({ interaction.reply({
content: `You can't drop cards for another ${cooldowns.dropCooldown} milliseconds`, content: `You can drop more cards in ${Math.floor((cooldowns.dropCooldown % 3600000) / 60000)} minutes`,
ephemeral: false ephemeral: false
}); });
return; return;
@@ -82,7 +82,7 @@ module.exports = {
const cooldowns = await UserUtils.getCooldowns(user); const cooldowns = await UserUtils.getCooldowns(user);
if (cooldowns.pullCooldown > 0 && permissionLevel < 2) { if (cooldowns.pullCooldown > 0 && permissionLevel < 2) {
i.reply({ i.reply({
content: `You can't claim cards for another ${cooldowns.dropCooldown} milliseconds`, content: `You can claim more cards in ${Math.floor((cooldowns.pullCooldown % 3600000) / 60000)} minutes`,
ephemeral: false ephemeral: false
}); });
return; return;