profile update with badges and achievements
This commit is contained in:
@@ -11,6 +11,10 @@ const {
|
||||
temporaryEphemeralReply
|
||||
} = require("./cookieEconomy");
|
||||
|
||||
const {
|
||||
trackProfileEvent
|
||||
} = require("./profileSystem");
|
||||
|
||||
|
||||
/*
|
||||
* ============================================================
|
||||
@@ -852,6 +856,63 @@ async function playRoulette(
|
||||
bet;
|
||||
|
||||
|
||||
await trackProfileEvent(
|
||||
interaction,
|
||||
playerId,
|
||||
{
|
||||
type:
|
||||
"game_result",
|
||||
|
||||
game:
|
||||
"roulette",
|
||||
|
||||
result:
|
||||
profit > 0
|
||||
? "win"
|
||||
: profit < 0
|
||||
? "loss"
|
||||
: "push"
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user