aboutsummaryrefslogtreecommitdiff
path: root/bot/src/commands/ask.js
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src/commands/ask.js')
-rw-r--r--bot/src/commands/ask.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/bot/src/commands/ask.js b/bot/src/commands/ask.js
new file mode 100644
index 0000000..fec0846
--- /dev/null
+++ b/bot/src/commands/ask.js
@@ -0,0 +1,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.id}> asked:\n**${question}**\nMy answer:\n**${answers[Math.floor(Math.random() * answers.length)]}**`
+ );
+ }
+};