mirror of
https://github.com/cassoule/flopobot_v2.git
synced 2026-03-18 21:40:27 +01:00
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user