Files
xiao/commands/games/lottery.js
T
Daniel Odendahl Jr b6afded306 Updates
2017-11-09 00:02:59 +00:00

19 lines
509 B
JavaScript

const { Command } = require('discord.js-commando');
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 1000 chance of winning.'
});
}
run(msg) {
const lottery = Math.floor(Math.random() * 1000) + 1;
if (lottery === 1) return msg.reply('Nice job! 10/10! You deserve some cake!');
return msg.reply('Nope, sorry, you lost.');
}
};