Add extra bomb cooldown

This commit is contained in:
Christopher Cookman 2023-08-14 18:37:46 -06:00
parent a434ec9f49
commit 1300565017

View file

@ -459,7 +459,6 @@ client.on("interactionCreate", async interaction => {
});
}
}
slotCooldowns[interaction.user.id] = Date.now() + (config.games.slots.cooldown * 60 * 1000);
// Check if they have enough money to play, 3 coins, if they do take it and continue
balance = await checkPoints(interaction.user);
@ -470,7 +469,12 @@ client.on("interactionCreate", async interaction => {
// Get the slot results, yes it's pre-defined, but it's not like it matters
let slotResults = playSlotMachine();
// If there is a slotResults.cooldownOverride use that instead
if (slotResults.cooldownOverride) {
slotCooldowns[interaction.user.id] = Date.now() + (slotResults.cooldownOverride * 60 * 1000);
} else {
slotCooldowns[interaction.user.id] = Date.now() + (config.games.slots.cooldown * 60 * 1000);
}
await interaction.reply({
embeds: [{
title: "Slots",
@ -799,11 +803,14 @@ function playSlotMachine() {
coinDifference = -1;
}
var cooldownOverride = 6 * iconCounts('💣'); // Change the cooldown to 6 minutes per bomb
const result = {
jackpot,
triple,
bombs,
spinResult,
cooldownOverride,
coinDifference
};