diff --git a/commands/botinfo/banlist.json b/commands/botinfo/banlist.json index 1007bbbe..23f6cacb 100644 --- a/commands/botinfo/banlist.json +++ b/commands/botinfo/banlist.json @@ -1,5 +1,6 @@ { "banned": { - "155112606661607425": "155112606661607425" + "155112606661607425": "155112606661607425", + "242699360352206850": "242699360352206850" } } diff --git a/commands/games/rockpaperscissors.js b/commands/games/rockpaperscissors.js index 44ecde44..efd1bccb 100644 --- a/commands/games/rockpaperscissors.js +++ b/commands/games/rockpaperscissors.js @@ -15,6 +15,12 @@ module.exports = class RockPaperScissors extends commando.Command { key: 'choice', prompt: 'Rock, Paper, or Scissors?', type: 'string', + validate: rps => { + if (rps.toLowerCase() === 'rock' || rps.toLowerCase() === 'paper' || rps.toLowerCase() === 'scissors') { + return true; + } + return 'Please enter either `rock`, `paper`, or `scissors`.'; + } }] }); } @@ -27,7 +33,7 @@ module.exports = class RockPaperScissors extends commando.Command { let rps = args.choice.toLowerCase(); let response = ['Paper', 'Rock', 'Scissors']; response = response[Math.floor(Math.random() * response.length)]; - if (rps.includes("rock")) { + if (rps === "rock") { if (response === "Rock") { return message.channel.send("Rock! Aw, it's a tie!"); } @@ -38,7 +44,7 @@ module.exports = class RockPaperScissors extends commando.Command { return message.channel.send("Scissors! Aw... I lose..."); } } - else if (rps.includes("paper")) { + else if (rps === "paper") { if (response === "Rock") { return message.channel.send("Rock! Aw... I lose..."); } @@ -49,7 +55,7 @@ module.exports = class RockPaperScissors extends commando.Command { return message.channel.send("Scissors! Yes! I win!"); } } - else if (rps.includes("scissors")) { + else if (rps === "scissors") { if (response === "Rock") { return message.channel.send("Rock! Yes! I win!"); } @@ -60,6 +66,5 @@ module.exports = class RockPaperScissors extends commando.Command { return message.channel.send("Scissors! Aw, it's a tie!"); } } - else return message.channel.send(':x: Error! Please enter rock, paper, or scissors!'); } };