added roulette

This commit is contained in:
DeSqBlocki
2026-08-18 21:03:07 +02:00
parent 0d512960a7
commit 32ce20bd72
13 changed files with 1401 additions and 22 deletions
+76 -22
View File
@@ -145,18 +145,56 @@ async function showCrumbSaucer(
});
}
function getSlotsSessionOwner(
interaction
) {
const footer =
interaction.message
.embeds[0]
?.footer
?.text;
const parts =
footer?.split(":")
??
[];
/*
* Main Crumb Saucer
*/
if (
parts[0] ===
"crumbSaucer"
) {
return parts[1];
}
/*
* Slots menu/result
*/
if (
parts[0] ===
"crumbSaucerSlots"
) {
return parts[1];
}
return null;
}
/*
* ============================================================
* SLOT MENU
* ============================================================
*/
async function showSlots(
interaction
) {
const ownerId =
getMenuOwner(
getSlotsSessionOwner(
interaction
);
@@ -169,7 +207,7 @@ async function showSlots(
interaction,
{
content:
"This isn't your Crumb Saucer session. Open your own with `/crumbsaucer`."
"This isn't your Crumb Saucer session."
}
);
}
@@ -222,7 +260,6 @@ async function showSlots(
});
}
/*
* ============================================================
* PLAY SLOTS
@@ -629,7 +666,10 @@ function buildMainMenuEmbed(
"### 🃏 Blackjack",
"Beat the dealer without going over 21.",
"",
"*More attractions coming soon...*"
"### 🎡 Roulette",
"Bet on Red, Black, Odd, Even, or Zero.",
"",
"*More attractions coming soon... make a lala offering or buy me a white monster*"
].join("\n")
)
.addFields({
@@ -670,20 +710,6 @@ function buildMainMenuButtons() {
ButtonStyle.Primary
),
new ButtonBuilder()
.setCustomId(
"crumbSaucerHeist"
)
.setLabel(
"Vault Heist"
)
.setEmoji(
"🏦"
)
.setStyle(
ButtonStyle.Danger
),
new ButtonBuilder()
.setCustomId(
"crumbSaucerBlackjack"
@@ -696,6 +722,34 @@ function buildMainMenuButtons() {
)
.setStyle(
ButtonStyle.Success
),
new ButtonBuilder()
.setCustomId(
"crumbSaucerRoulette"
)
.setLabel(
"Roulette"
)
.setEmoji(
"🎡"
)
.setStyle(
ButtonStyle.Primary
),
new ButtonBuilder()
.setCustomId(
"crumbSaucerHeist"
)
.setLabel(
"Vault Heist"
)
.setEmoji(
"🏦"
)
.setStyle(
ButtonStyle.Danger
)
)
];
@@ -1023,11 +1077,11 @@ function buildSlotDisplay(
grid
) {
return [
"╔═════════════╗",
"╔═════════╗",
`║ ${grid[0][0]} │ ${grid[0][1]} │ ${grid[0][2]} ║`,
`║ ${grid[1][0]} │ ${grid[1][1]} │ ${grid[1][2]} ║`,
`║ ${grid[2][0]} │ ${grid[2][1]} │ ${grid[2][2]} ║`,
"╚═════════════╝"
"╚═════════╝"
].join("\n");
}
@@ -1080,7 +1134,7 @@ function getSlotResultName(
switch (
outcome.symbol
outcome.symbol
) {
case "🍋":
return "🍋 Triple Lemon!";