Add extra bomb cooldown
This commit is contained in:
parent
a434ec9f49
commit
1300565017
11
index.js
11
index.js
|
@ -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
|
// Check if they have enough money to play, 3 coins, if they do take it and continue
|
||||||
balance = await checkPoints(interaction.user);
|
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
|
// Get the slot results, yes it's pre-defined, but it's not like it matters
|
||||||
let slotResults = playSlotMachine();
|
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({
|
await interaction.reply({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: "Slots",
|
title: "Slots",
|
||||||
|
@ -799,11 +803,14 @@ function playSlotMachine() {
|
||||||
coinDifference = -1;
|
coinDifference = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var cooldownOverride = 6 * iconCounts('💣'); // Change the cooldown to 6 minutes per bomb
|
||||||
|
|
||||||
const result = {
|
const result = {
|
||||||
jackpot,
|
jackpot,
|
||||||
triple,
|
triple,
|
||||||
bombs,
|
bombs,
|
||||||
spinResult,
|
spinResult,
|
||||||
|
cooldownOverride,
|
||||||
coinDifference
|
coinDifference
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue