mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
The Power of const
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = class LotteryCommand extends commando.Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let lotteryNumber = ['Winner'][Math.floor(Math.random() * 100)];
|
||||
const lotteryNumber = ['Winner'][Math.floor(Math.random() * 100)];
|
||||
if (lotteryNumber !== "Winner") return message.say(`Nope, sorry ${message.author.username}, you lost.`);
|
||||
return message.say(`Wow ${message.author.username}! You actually won! Great job!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user