This commit is contained in:
Daniel Odendahl Jr
2017-04-30 22:56:59 +00:00
parent 83e990ae1c
commit 877f720cfc
105 changed files with 460 additions and 461 deletions
+10 -10
View File
@@ -25,30 +25,30 @@ module.exports = class RockPaperScissorsCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { choice } = args;
const response = responses[Math.floor(Math.random() * responses.length)];
if (choice === 'rock') {
if (response === 'Rock')
return message.say('Rock! Aw, it\'s a tie!');
return msg.say('Rock! Aw, it\'s a tie!');
if (response === 'Paper')
return message.say('Paper! Yes! I win!');
return msg.say('Paper! Yes! I win!');
if (response === 'Scissors')
return message.say('Scissors! Aw... I lose...');
return msg.say('Scissors! Aw... I lose...');
} else if (choice === 'paper') {
if (response === 'Rock')
return message.say('Rock! Aw... I lose...');
return msg.say('Rock! Aw... I lose...');
if (response === 'Paper')
return message.say('Paper! Aw, it\'s a tie!');
return msg.say('Paper! Aw, it\'s a tie!');
if (response === 'Scissors')
return message.say('Scissors! Yes! I win!');
return msg.say('Scissors! Yes! I win!');
} else if (choice === 'scissors') {
if (response === 'Rock')
return message.say('Rock! Yes! I win!');
return msg.say('Rock! Yes! I win!');
if (response === 'Paper')
return message.say('Paper! Aw... I lose...');
return msg.say('Paper! Aw... I lose...');
if (response === 'Scissors')
return message.say('Scissors! Aw, it\'s a tie!');
return msg.say('Scissors! Aw, it\'s a tie!');
}
}
};