diff --git a/commands/games/hangman.js b/commands/games/hangman.js index deee262c..987d7119 100644 --- a/commands/games/hangman.js +++ b/commands/games/hangman.js @@ -36,14 +36,16 @@ module.exports = class HangmanCommand extends Command { const incorrect = []; const display = '_'.repeat(word.length).split(''); while (word.length !== confirmation.length && points < 7) { - await msg.code(null, stripIndents` + await msg.say(stripIndents` + The word is: ${display.join(' ')}. Which letter do you choose? + \`\`\` ___________ | | | ${points > 0 ? 'O' : ''} | ${points > 2 ? '—' : ' '}${points > 1 ? '|' : ''}${points > 3 ? '—' : ''} | ${points > 4 ? '/' : ''} ${points > 5 ? '\\' : ''} =========== - The word is: ${display.join(' ')}. Which letter do you choose? + \`\`\` `); const guess = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, diff --git a/commands/games/tic-tac-toe.js b/commands/games/tic-tac-toe.js index b6125be2..33d177cd 100644 --- a/commands/games/tic-tac-toe.js +++ b/commands/games/tic-tac-toe.js @@ -42,14 +42,16 @@ module.exports = class TicTacToeCommand extends Command { while (!winner && taken.length < 9) { const user = userTurn ? msg.author : opponent; const sign = userTurn ? 'X' : 'O'; - await msg.code(null, stripIndents` + await msg.code(stripIndents` + ${user}, which side do you pick? + \`\`\` ${sides[0]} | ${sides[1]} | ${sides[2]} ————————— ${sides[3]} | ${sides[4]} | ${sides[5]} ————————— ${sides[6]} | ${sides[7]} | ${sides[8]} + \`\`\` `); - await msg.say(`${user}, which side do you pick?`); const turn = await msg.channel.awaitMessages(res => res.author.id === user.id, { max: 1, time: 30000 diff --git a/commands/random-res/charlie-charlie-challenge.js b/commands/random-res/charlie-charlie-challenge.js new file mode 100644 index 00000000..5479103b --- /dev/null +++ b/commands/random-res/charlie-charlie-challenge.js @@ -0,0 +1,38 @@ +const { Command } = require('discord.js-commando'); +const { stripIndent } = require('common-tags'); +const answers = ['no1', 'yes1', 'no2', 'yes2']; + +module.exports = class CharlieCharlieChallengeCommand extends Command { + constructor(client) { + super(client, { + name: 'charlie-charlie-challenge', + aliases: ['charlie-charlie'], + group: 'random-res', + memberName: 'charlie-charlie-challenge', + description: 'Asks your question to Charlie.', + args: [ + { + key: 'question', + prompt: 'What do you want to ask Charlie?', + type: 'string' + } + ] + }); + } + + run(msg, { question }) { + const answer = answers[Math.floor(Math.random() * answers.length)]; + return msg.say(stripIndent` + Question: ${question} + \`\`\` + ${answer === 'no1' ? '\\' : ' '} | ${answer === 'yes1' ? '/' : ' '} + NO ${answer === 'no1' ? '\\' : ' '} | ${answer === 'yes1' ? '/' : ' '}YES + ${answer === 'no1' ? '\\' : ' '}|${answer === 'yes1' ? '/' : ' '} + ---------------- + ${answer === 'yes2' ? '/' : ' '}|${answer === 'no2' ? '\\' : ' '} + YES${answer === 'yes2' ? '/' : ' '} | ${answer === 'no2' ? '\\' : ' '}NO + ${answer === 'yes2' ? '/' : ' '} | ${answer === 'no2' ? '\\' : ' '} + \`\`\` + `); + } +}; diff --git a/package.json b/package.json index 4d3d84dd..3b7af12e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "46.2.1", + "version": "46.3.0", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {