From f4c8f36cc5c2f9bb5c6a3302655f8a9bbe8413ab Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 11 Nov 2019 23:11:54 -0500 Subject: [PATCH] Make the message cleaner --- commands/games/russian-roulette.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/commands/games/russian-roulette.js b/commands/games/russian-roulette.js index 8d641ca7..17dc826f 100644 --- a/commands/games/russian-roulette.js +++ b/commands/games/russian-roulette.js @@ -1,4 +1,5 @@ const Command = require('../../structures/Command'); +const { stripIndents } = require('common-tags'); const { shuffle, verify } = require('../../util/Util'); module.exports = class RussianRouletteCommand extends Command { @@ -40,12 +41,16 @@ module.exports = class RussianRouletteCommand extends Command { let winner = null; while (!winner) { const player = userTurn ? msg.author : opponent; - await msg.say(`${player.tag} pulls the trigger... And **${gun[round] ? 'dies!**' : 'lives...** Continue?'}`); + const notPlayer = userTurn ? msg.author : opponent; + await msg.say(stripIndents` + **${player.tag}** pulls the trigger... **And ${gun[round] ? 'dies!**' : 'lives...**'} + ${opponent.bot ? 'Continue?' : `Will you take the gun, ${notPlayer}?`} + `); if (gun[round]) { - winner = userTurn ? opponent : msg.author; + winner = notPlayer; } else { - const keepGoing = await verify(msg.channel, opponent.bot ? msg.author : player); - if (!keepGoing) winner = userTurn ? opponent : msg.author; + const keepGoing = await verify(msg.channel, opponent.bot ? msg.author : notPlayer); + if (!keepGoing) winner = notPlayer; round++; userTurn = !userTurn; }