aboutsummaryrefslogtreecommitdiff
path: root/bot/src/commands/ask.js
blob: 4193e920790dbedb7b3e1e10c5f254a3f340da02 (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
32
33
import { SlashCommandBuilder } from 'discord.js';

export default {
    data: new SlashCommandBuilder()
        .setName('ask')
        .setDescription('Ask AleeBot a question.')
        .addStringOption(option =>
            option
                .setName('question')
                .setDescription('The question you will be asking AleeBot.')
                .setRequired(true)),
    async execute(interaction) {
        const question = interaction.options.getString('question');

        const answers = [
            'Yes.',
            'Nope. Just kidding :P',
            'Definitely!',
            'No.',
            'Yep. Just kidding :P',
            'I doubt it.',
            'Maybe?',
            'Perhaps...',
            'I don\'t know?',
            'Can you ask me later? My CPU is overloading.',
            'Hmm let me think :thinking:',
        ];

        return await interaction.reply(
            `**${interaction.user.displayName}** asked:\n**${question}**\nMy answer:\n**${answers[Math.floor(Math.random() * answers.length)]}**`
        );
    }
};