updated profile and centralized functions

This commit is contained in:
DeSqBlocki
2026-08-22 23:33:20 +02:00
parent 08d1a8c5cd
commit 030b4b8883
18 changed files with 3747 additions and 1202 deletions
+2 -30
View File
@@ -13,7 +13,7 @@ const {
} = require("./cookieEconomy");
const {
trackProfileEvent
recordGameOutcome
} = require("./profileSystem");
const SLOT_BETS = [
@@ -308,12 +308,10 @@ async function playSlots(
const profit =
payout - bet;
await trackProfileEvent(
await recordGameOutcome(
interaction,
playerId,
{
type:
"game_result",
game:
"slots",
result:
@@ -331,32 +329,6 @@ async function playSlots(
}
);
if (profit > 0) {
await trackProfileEvent(
interaction,
playerId,
{
type:
"cookie_gain",
amount:
profit
}
);
}
else if (profit < 0) {
await trackProfileEvent(
interaction,
playerId,
{
type:
"cookie_loss",
amount:
Math.abs(profit)
}
);
}
const resultEmbed =
new EmbedBuilder()
.setTitle(