From 51d21e3eb3a4a4bb0e735259fc35f9c8d5ea6991 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 16 May 2021 13:43:13 -0400 Subject: [PATCH] Add wall of shame to russian roulette --- commands/games-mp/russian-roulette.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/commands/games-mp/russian-roulette.js b/commands/games-mp/russian-roulette.js index b6acfa32..a944908b 100644 --- a/commands/games-mp/russian-roulette.js +++ b/commands/games-mp/russian-roulette.js @@ -49,6 +49,7 @@ module.exports = class RussianRouletteCommand extends Command { let round = 0; let loser = null; let winner = null; + const wallOfShame = []; while (!loser && !winner) { const player = players.get(turn[0]); turn.push(turn[0]); @@ -76,6 +77,7 @@ module.exports = class RussianRouletteCommand extends Command { if (first) first = false; const keepGoing = await verify(msg.channel, nextPlayer.user); if (keepGoing) break; + wallOfShame.push(players.get(next).user.toString()); players.delete(next); removeFromArray(turn, next); } @@ -86,8 +88,20 @@ module.exports = class RussianRouletteCommand extends Command { } } this.client.games.delete(msg.channel.id); - if (winner) return msg.say(`The winner is ${winner.user}!`); - return msg.say(`The loser is ${loser.user}!`); + if (winner) { + return msg.say(stripIndents` + The winner is ${winner.user}! + + __**Wall Of Shame:**__ + ${wallOfShame.length ? wallOfShame.join('\n') : 'No one!'} + `); + } + return msg.say(stripIndents` + The loser is ${loser.user}! + + __**Wall Of Shame:**__ + ${wallOfShame.length ? wallOfShame.join('\n') : 'No one!'} + `); } catch (err) { this.client.games.delete(msg.channel.id); throw err;