aboutsummaryrefslogtreecommitdiff
path: root/bot/src/commands/ask.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-02 16:24:26 -0500
committerAndrew Lee <andrew@alee14.me>2025-03-02 16:24:26 -0500
commit1c253d25cb1d35aa987d76e07806999c562712d6 (patch)
tree02655b6a3bed5b3604b56deb4c2af199f2609a64 /bot/src/commands/ask.js
parentf98f7e6a34f02e8d6ea6673fbe68ab6db28a2e89 (diff)
downloadAleeBot-1c253d25cb1d35aa987d76e07806999c562712d6.tar.gz
AleeBot-1c253d25cb1d35aa987d76e07806999c562712d6.tar.bz2
AleeBot-1c253d25cb1d35aa987d76e07806999c562712d6.zip
Bringing more features from 2.x; ESLint; API
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)]}**`
+ );
+ }
+};