snapshot migration subPhase 5.5

This commit is contained in:
DeSqBlocki
2026-08-27 19:50:12 +02:00
parent 9710fc65bf
commit 14a059034c
7 changed files with 154 additions and 126 deletions
+90 -79
View File
@@ -447,56 +447,59 @@ async function steal(interaction) {
* Thief stats.
*/
await trackProfileEvent(
interaction,
user.id,
{
type:
"steal_success",
amount,
targetUserId:
target.id
}
);
await trackProfileEvent(
interaction,
user.id,
{
type: "steal_success",
source: "steal",
amount,
targetUserId:
target.id
}
);
await trackProfileEvent(
interaction,
user.id,
{
type:
"cookie_gain",
amount
}
);
await trackProfileEvent(
interaction,
user.id,
{
type: "cookie_gain",
source: "steal",
amount,
targetUserId:
target.id
}
);
/*
* Victim stats.
*/
await trackProfileEvent(
interaction,
target.id,
{
type:
"stolen_from_me",
amount,
thiefUserId:
user.id
}
);
await trackProfileEvent(
interaction,
target.id,
{
type: "stolen_from_me",
source: "steal",
amount,
thiefUserId:
user.id
}
);
await trackProfileEvent(
interaction,
target.id,
{
type:
"cookie_loss",
amount
}
);
await trackProfileEvent(
interaction,
target.id,
{
type: "cookie_loss",
source: "steal",
amount,
thiefUserId:
user.id
}
);
const [
@@ -653,28 +656,32 @@ async function steal(interaction) {
* Profile tracking.
*/
await trackProfileEvent(
interaction,
user.id,
{
type:
"cookie_loss",
amount:
penalty
}
);
await trackProfileEvent(
interaction,
user.id,
{
type: "cookie_loss",
source: "steal_penalty",
amount:
penalty,
targetUserId:
target.id
}
);
await trackProfileEvent(
interaction,
target.id,
{
type:
"cookie_gain",
amount:
penalty
}
);
await trackProfileEvent(
interaction,
target.id,
{
type: "cookie_gain",
source: "steal_penalty",
amount:
penalty,
thiefUserId:
user.id
}
);
const [
@@ -902,30 +909,34 @@ async function give(interaction) {
* Sender lifetime giving.
*/
await trackProfileEvent(
interaction,
user.id,
{
type:
"cookies_given",
amount
}
);
await trackProfileEvent(
interaction,
user.id,
{
type: "cookies_given",
source: "give",
amount,
targetUserId:
target.id
}
);
/*
* Recipient lifetime gain.
*/
await trackProfileEvent(
interaction,
target.id,
{
type:
"cookie_gain",
amount
}
);
await trackProfileEvent(
interaction,
target.id,
{
type: "cookie_gain",
source: "give",
amount,
senderUserId:
user.id
}
);
const [