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
@@ -12,7 +12,7 @@ const {
} = require("./cookieEconomy");
const {
trackProfileEvent
recordGameOutcome
} = require("./profileSystem");
const ROULETTE_BETS = [
@@ -577,12 +577,10 @@ async function playRoulette(
const profit =
payout - bet;
await trackProfileEvent(
await recordGameOutcome(
interaction,
playerId,
{
type:
"game_result",
game:
"roulette",
result:
@@ -602,32 +600,6 @@ async function playRoulette(
}
);
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(