Merge pull request #70 from cassoule/milo-260129

message update
This commit is contained in:
Milo Gourvest
2026-01-29 09:07:46 +01:00
committed by GitHub

View File

@@ -271,12 +271,12 @@ export async function onGameOver(client, gameType, playerId, winnerId, reason =
resultText = `Victoire de ${winnerName}`; resultText = `Victoire de ${winnerName}`;
} }
await updateDiscordMessage(client, game, title, `${resultText} ${reason}`);
if (gameType === "tictactoe") io.emit("tictactoegameOver", { game, winner: winnerId }); if (gameType === "tictactoe") io.emit("tictactoegameOver", { game, winner: winnerId });
if (gameType === "connect4") io.emit("connect4gameOver", { game, winner: winnerId }); if (gameType === "connect4") io.emit("connect4gameOver", { game, winner: winnerId });
if (gameType === "snake") io.emit("snakegameOver", { game, winner: winnerId }); if (gameType === "snake") io.emit("snakegameOver", { game, winner: winnerId });
await updateDiscordMessage(client, game, title, `${resultText} ${reason}`);
if (gameKey) { if (gameKey) {
setTimeout(() => delete activeGames[gameKey], 1000); setTimeout(() => delete activeGames[gameKey], 1000);
} }