snapshot_poker_phase5

This commit is contained in:
DeSqBlocki
2026-09-08 21:49:43 +02:00
parent 6342c4569b
commit 1ef2295c07
9 changed files with 1462 additions and 18 deletions
+61
View File
@@ -6,6 +6,12 @@ const {
refreshPokerTableMessage
} = require("../utils/pokerDiscord");
const {
announcePokerHandProgress,
createPokerProfileContext,
recordPokerHandProfiles
} = require("../utils/pokerProfile");
const TURN_CHECK_INTERVAL =
5 * 1000;
@@ -91,6 +97,39 @@ async function processPokerTurns(
client,
result
);
if (
result.game
?.data
?.hand
?.state ===
"PAYOUT"
) {
try {
await recordPokerHandProfiles(
result.game
);
const context =
await createPokerProfileContext(
client,
result.game
);
if (context) {
await announcePokerHandProgress(
context,
result.game
);
}
}
catch (error) {
console.error(
`[PokerProfile] Timeout profile processing failed for ${result.game.gameId}:`,
error
);
}
}
}
}
}
@@ -169,6 +208,28 @@ async function recoverPoker(
client,
game
);
if (
game.data?.hand?.state ===
"PAYOUT"
) {
await recordPokerHandProfiles(
game
);
const context =
await createPokerProfileContext(
client,
game
);
if (context) {
await announcePokerHandProgress(
context,
game
);
}
}
}
catch (error) {
console.error(