Files
xiao/commands/games/lottery.js
T
Daniel Odendahl Jr 56e72f7509 Lots of Changes
2017-08-26 01:20:43 +00:00

19 lines
508 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class LotteryCommand extends Command {
constructor(client) {
super(client, {
name: 'lottery',
group: 'games',
memberName: 'lottery',
description: 'Attempt to win the lottery, with a 1 in 100 chance of winning.'
});
}
run(msg) {
const lottery = Math.floor(Math.random() * 100) + 1;
if (lottery === 1) return msg.reply('Nice job! 10/10! You deserve some cake!');
return msg.reply('Nope, sorry, you lost.');
}
};