Split Single and Multi Player Games

This commit is contained in:
Dragon Fire
2019-12-02 22:38:40 -05:00
parent 53fba29dc0
commit 7dfdc7060c
29 changed files with 42 additions and 38 deletions
+30
View File
@@ -0,0 +1,30 @@
const Command = require('../../structures/Command');
const { stripIndents } = require('common-tags');
const slots = ['🍇', '🍊', '🍐', '🍒', '🍋'];
module.exports = class SlotsCommand extends Command {
constructor(client) {
super(client, {
name: 'slots',
group: 'sp-games',
memberName: 'slots',
description: 'Play a game of slots.'
});
}
run(msg) {
const slotOne = slots[Math.floor(Math.random() * slots.length)];
const slotTwo = slots[Math.floor(Math.random() * slots.length)];
const slotThree = slots[Math.floor(Math.random() * slots.length)];
if (slotOne === slotTwo && slotOne === slotThree) {
return msg.reply(stripIndents`
${slotOne}|${slotTwo}|${slotThree}
Wow! You won! Great job... er... luck!
`);
}
return msg.reply(stripIndents`
${slotOne}|${slotTwo}|${slotThree}
Aww... You lost... Guess it's just bad luck, huh?
`);
}
};