From f6afb27cf44f3ee7062be24432cec60faaecbecc Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 15 Jul 2017 17:04:27 +0000 Subject: [PATCH] Multiple Words --- commands/games/gunfight.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/commands/games/gunfight.js b/commands/games/gunfight.js index 0fd8a0b9..c4f5f95c 100644 --- a/commands/games/gunfight.js +++ b/commands/games/gunfight.js @@ -1,4 +1,5 @@ const Command = require('../../structures/Command'); +const words = ['fire', 'draw', 'shoot', 'bang', 'pull']; module.exports = class GunfightCommand extends Command { constructor(client) { @@ -40,8 +41,9 @@ module.exports = class GunfightCommand extends Command { await msg.say('Get Ready...'); const length = Math.floor(Math.random() * (30000 - 1000 + 1) + 1000); this.client.setTimeout(async () => { - await msg.say('TYPE `FIRE` NOW!'); - const filter = (res) => [opponent.id, msg.author.id].includes(res.author.id) && res.content.toLowerCase() === 'fire'; // eslint-disable-line max-len + const word = words[Math.floor(Math.random() * words.length)]; + await msg.say(`TYPE \`${word.toUpperCase()}\` NOW!`); + const filter = (res) => [opponent.id, msg.author.id].includes(res.author.id) && res.content.toLowerCase() === word; // eslint-disable-line max-len const winner = await msg.channel.awaitMessages(filter, { max: 1, time: 30000 diff --git a/package.json b/package.json index ddc668ea..5b55b39b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "27.3.0", + "version": "27.3.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {