added new logic to the new rewards
This commit is contained in:
+21
-3
@@ -13,7 +13,8 @@ const {
|
||||
} = require("./cookieEconomy");
|
||||
|
||||
const {
|
||||
recordGameOutcome
|
||||
recordGameOutcome,
|
||||
trackProfileEvent
|
||||
} = require("./profileSystem");
|
||||
|
||||
const SLOT_BETS = [
|
||||
@@ -104,7 +105,8 @@ async function showSlots(interaction) {
|
||||
|
||||
async function playSlots(
|
||||
interaction,
|
||||
bet
|
||||
bet,
|
||||
source = "normal"
|
||||
) {
|
||||
const ownerId =
|
||||
getSlotsSessionOwner(
|
||||
@@ -197,6 +199,17 @@ async function playSlots(
|
||||
throw error;
|
||||
}
|
||||
|
||||
await trackProfileEvent(
|
||||
interaction,
|
||||
playerId,
|
||||
{
|
||||
type: "game_start",
|
||||
game: "slots",
|
||||
source,
|
||||
bet
|
||||
}
|
||||
);
|
||||
|
||||
await interaction.update({
|
||||
embeds: [
|
||||
buildSpinningEmbed(
|
||||
@@ -321,6 +334,10 @@ async function playSlots(
|
||||
? "loss"
|
||||
: "push",
|
||||
profit,
|
||||
triplet:
|
||||
outcome.type === "triple"
|
||||
? outcome.symbol
|
||||
: null,
|
||||
jackpot:
|
||||
outcome.type ===
|
||||
"triple" &&
|
||||
@@ -460,7 +477,8 @@ async function runSlotsBack(
|
||||
|
||||
return playSlots(
|
||||
interaction,
|
||||
bet
|
||||
bet,
|
||||
"run_it_back"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user