added roulette
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
const {
|
||||
showRoulette
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbSaucerRoulette",
|
||||
|
||||
async execute(interaction) {
|
||||
return showRoulette(
|
||||
interaction
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
chooseRouletteBet
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteBet10",
|
||||
|
||||
async execute(interaction) {
|
||||
return chooseRouletteBet(
|
||||
interaction,
|
||||
10
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
chooseRouletteBet
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteBet100",
|
||||
|
||||
async execute(interaction) {
|
||||
return chooseRouletteBet(
|
||||
interaction,
|
||||
100
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
chooseRouletteBet
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteBet1000",
|
||||
|
||||
async execute(interaction) {
|
||||
return chooseRouletteBet(
|
||||
interaction,
|
||||
1000
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
chooseRouletteBet
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteBet50",
|
||||
|
||||
async execute(interaction) {
|
||||
return chooseRouletteBet(
|
||||
interaction,
|
||||
50
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
chooseRouletteBet
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteBet500",
|
||||
|
||||
async execute(interaction) {
|
||||
return chooseRouletteBet(
|
||||
interaction,
|
||||
500
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
playRoulette
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteBlack",
|
||||
|
||||
async execute(interaction) {
|
||||
return playRoulette(
|
||||
interaction,
|
||||
"Black"
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
playRoulette
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteEven",
|
||||
|
||||
async execute(interaction) {
|
||||
return playRoulette(
|
||||
interaction,
|
||||
"Even"
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
playRoulette
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteOdd",
|
||||
|
||||
async execute(interaction) {
|
||||
return playRoulette(
|
||||
interaction,
|
||||
"Odd"
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
playRoulette
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteRed",
|
||||
|
||||
async execute(interaction) {
|
||||
return playRoulette(
|
||||
interaction,
|
||||
"Red"
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
playRoulette
|
||||
} = require(
|
||||
"../../utils/crumbRoulette"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"crumbRouletteZero",
|
||||
|
||||
async execute(interaction) {
|
||||
return playRoulette(
|
||||
interaction,
|
||||
"Zero"
|
||||
);
|
||||
}
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
+76
-22
@@ -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!";
|
||||
|
||||
Reference in New Issue
Block a user