Charlie Charlie Challenge Command

This commit is contained in:
Daniel Odendahl Jr
2017-10-10 13:05:45 +00:00
parent e5747a4bb7
commit 14ef082a07
4 changed files with 47 additions and 5 deletions
+4 -2
View File
@@ -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,
+4 -2
View File
@@ -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