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
+4 -26
View File
@@ -15,7 +15,8 @@ const {
} = require("./cookieEconomy");
const {
trackProfileEvent
trackProfileEvent,
recordGameOutcome
} = require("./profileSystem");
const HEIST_COOLDOWN =
@@ -255,12 +256,10 @@ async function resolveCookieHeist(
throw error;
}
await trackProfileEvent(
await recordGameOutcome(
interaction,
playerId,
{
type:
"game_result",
game:
"heist",
result:
@@ -280,15 +279,6 @@ async function resolveCookieHeist(
}
);
await trackProfileEvent(
interaction,
playerId,
{
type:
"cookie_gain",
amount
}
);
const [
playerAfter,
@@ -444,12 +434,10 @@ async function resolveCookieHeist(
throw error;
}
await trackProfileEvent(
await recordGameOutcome(
interaction,
playerId,
{
type:
"game_result",
game:
"heist",
result:
@@ -459,16 +447,6 @@ async function resolveCookieHeist(
}
);
await trackProfileEvent(
interaction,
playerId,
{
type:
"cookie_loss",
amount:
penalty
}
);
const [
playerAfter,