Files
xiao/commands/games/lottery.js
T
Daniel Odendahl Jr 877f720cfc msg
2017-04-30 22:56:59 +00:00

20 lines
636 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: '1 in 100 chance of winning. Winners get... The feeling of winning?'
});
}
run(msg) {
const lottery = Math.floor(Math.random() * 100) + 1;
if (lottery < 99)
return msg.say(`Nope, sorry ${msg.author.username}, you lost.`);
return msg.say(`Wow ${msg.author.username}! You actually won! Great job!`);
}
};