From 1c253d25cb1d35aa987d76e07806999c562712d6 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 2 Mar 2025 16:24:26 -0500 Subject: Bringing more features from 2.x; ESLint; API --- bot/src/commands/ask.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 bot/src/commands/ask.js (limited to 'bot/src/commands/ask.js') 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)]}**` + ); + } +}; -- cgit v1.2.3