summaryrefslogtreecommitdiff
path: root/server/src/commands/minigames/RussianRoulette.ts
blob: c52a4c855000465f8b6c6a2c2540073c91c325a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Command } from 'discord-akairo';
import { Message } from 'discord.js';

export default class RussianRouletteMinigames extends Command {
    public constructor() {
        super('russianroulette', {
            aliases: ['russianroulette', 'rr'],
            category: 'minigames',
            description: {
                content: 'Play a round of Russian Roulette.',
                usage: '',
                examples: [
                    ''
                ]
            },
            ratelimit: 3
        });
    }
    
    public exec(msg: Message): Promise<Message> {
        const chamber = Math.floor(Math.random() * 6);
        if (chamber === 0)
            return msg.reply('💥 *Bang.* You lose.');
        else
            return msg.reply("🔫 *Click.* You survived.");
    }
}