summaryrefslogtreecommitdiff
path: root/src/commands/fun/quantumcoinflip.ts
blob: 3f2446d99193accfc56afb2c08ac3bfef131eab4 (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
28
29
30
31
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
const sides = [NaN, 0, null, undefined, ''];

module.exports = class QuantumCoinFlipFun extends Command {
    constructor(client) {
        super(client, {
            name: 'quantumcoinflip',
            aliases: ['quantumflipcoin'],
            group: 'fun',
            memberName: 'quantumcoinflip',
            description: 'Flip a quantum coin.',
            throttling: {
                usages: 5,
                duration: 30
            },
            examples: ['uwu!coinflip', 'uwu!flipcoin'],
            userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
            clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
        });
    }
    run(msg: CommandoMessage) {
        var s = sides[Math.floor(Math.random() * sides.length)]
        let embed = new MessageEmbed()

            .setAuthor('The quantum coin landed on', 'https://i.imgur.com/pr7JCce.png')
            .setDescription('`' + s + '`');

        msg.say(embed);
    }
};