boos crumble snapshot

This commit is contained in:
DeSqBlocki
2026-08-18 19:45:43 +02:00
parent 24d5b395ca
commit b9a887259a
11 changed files with 2412 additions and 938 deletions
+18
View File
@@ -0,0 +1,18 @@
const {
showCrumbSaucer
} = require(
"../../utils/crumbSaucer"
);
module.exports = {
name:
"crumbSaucerBack",
async execute(interaction) {
return showCrumbSaucer(
interaction
);
}
};
+224
View File
@@ -0,0 +1,224 @@
const {
EmbedBuilder,
ActionRowBuilder,
ButtonBuilder,
ButtonStyle
} = require("discord.js");
const {
getCookieBalance,
temporaryEphemeralReply
} = require(
"../../utils/cookieEconomy"
);
module.exports = {
name:
"crumbSaucerHeist",
async execute(interaction) {
const footer =
interaction.message
.embeds[0]
?.footer
?.text;
const [
type,
ownerId
] =
footer
?.split(":")
??
[];
if (
type !==
"crumbSaucer" ||
ownerId !==
interaction.user.id
) {
return temporaryEphemeralReply(
interaction,
{
content:
"This isn't your Crumb Saucer session."
}
);
}
const vaultId =
interaction.client.user.id;
const [
vault,
player
] =
await Promise.all([
getCookieBalance(
vaultId
),
getCookieBalance(
interaction.user.id
)
]);
if (
player < 1
) {
return temporaryEphemeralReply(
interaction,
{
content:
"You need at least **1 Cookie** before attempting a vault heist."
}
);
}
if (
vault < 1
) {
return temporaryEphemeralReply(
interaction,
{
content:
"The ShaiBot Vault is currently empty."
}
);
}
const embed =
new EmbedBuilder()
.setTitle(
"🏦 ShaiBot Cookie Vault"
)
.setDescription(
[
`**Vault Balance:** ${vault.toLocaleString()} 🍪`,
`**Security:** ${getSecurityLabel(vault)}`,
"",
"Choose your approach.",
"",
"🥷 **Sneak**",
"High chance • Small haul • Small fine",
"",
"💻 **Hack**",
"Medium chance • Medium haul • Medium fine",
"",
"💥 **Smash**",
"Low chance • Large haul • Large fine"
].join("\n")
)
.setFooter({
text:
`cookieHeist:${interaction.user.id}`
});
const heistButtons =
new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId(
"cookieHeistSneak"
)
.setLabel(
"Sneak"
)
.setEmoji(
"🥷"
)
.setStyle(
ButtonStyle.Primary
),
new ButtonBuilder()
.setCustomId(
"cookieHeistHack"
)
.setLabel(
"Hack"
)
.setEmoji(
"💻"
)
.setStyle(
ButtonStyle.Secondary
),
new ButtonBuilder()
.setCustomId(
"cookieHeistSmash"
)
.setLabel(
"Smash"
)
.setEmoji(
"💥"
)
.setStyle(
ButtonStyle.Danger
)
);
return interaction.update({
embeds: [
embed
],
components: [
heistButtons
]
});
}
};
function getSecurityLabel(
vault
) {
if (
vault <
1000
) {
return "🟢 Low";
}
if (
vault <
10000
) {
return "🟡 Moderate";
}
if (
vault <
50000
) {
return "🟠 High";
}
if (
vault <
250000
) {
return "🔴 Very High";
}
return "🟣 Maximum";
}
+18
View File
@@ -0,0 +1,18 @@
const {
showSlots
} = require(
"../../utils/crumbSaucer"
);
module.exports = {
name:
"crumbSaucerSlots",
async execute(interaction) {
return showSlots(
interaction
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playSlots
} = require(
"../../utils/crumbSaucer"
);
module.exports = {
name:
"crumbSaucerSlots10",
async execute(interaction) {
return playSlots(
interaction,
10
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playSlots
} = require(
"../../utils/crumbSaucer"
);
module.exports = {
name:
"crumbSaucerSlots100",
async execute(interaction) {
return playSlots(
interaction,
100
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playSlots
} = require(
"../../utils/crumbSaucer"
);
module.exports = {
name:
"crumbSaucerSlots1000",
async execute(interaction) {
return playSlots(
interaction,
1000
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playSlots
} = require(
"../../utils/crumbSaucer"
);
module.exports = {
name:
"crumbSaucerSlots50",
async execute(interaction) {
return playSlots(
interaction,
50
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playSlots
} = require(
"../../utils/crumbSaucer"
);
module.exports = {
name:
"crumbSaucerSlots500",
async execute(interaction) {
return playSlots(
interaction,
500
);
}
};