mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 15:57:47 +02:00
msg
This commit is contained in:
@@ -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!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user