Files
xiao/commands/games/lottery.js
T
Daniel Odendahl Jr 657b7b727d More Clean-Ups
2017-04-25 14:04:07 +00:00

20 lines
656 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(message) {
const lottery = Math.floor(Math.random() * 100) + 1;
if (lottery < 99)
return message.say(`Nope, sorry ${message.author.username}, you lost.`);
return message.say(`Wow ${message.author.username}! You actually won! Great job!`);
}
};