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
@@ -18,7 +18,7 @@ const {
} = require("./cookieEconomy");
const {
trackProfileEvent
recordGameOutcome
} = require("./profileSystem");
const GAME_COLLECTION =
@@ -929,12 +929,10 @@ async function finishBlackjack(
profileResult = "loss";
}
await trackProfileEvent(
await recordGameOutcome(
interaction,
game.userId,
{
type:
"game_result",
game:
"blackjack",
result:
@@ -949,32 +947,6 @@ async function finishBlackjack(
}
);
if (profit > 0) {
await trackProfileEvent(
interaction,
game.userId,
{
type:
"cookie_gain",
amount:
profit
}
);
}
else if (profit < 0) {
await trackProfileEvent(
interaction,
game.userId,
{
type:
"cookie_loss",
amount:
Math.abs(profit)
}
);
}
const description = [
"**Dealer**",
formatCards(