Initial commit
This commit is contained in:
45
src/commands/memes/8ball.js
Normal file
45
src/commands/memes/8ball.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
const data = new SlashCommandBuilder()
|
||||
.setName('8ball')
|
||||
.setDescription('Returns a Magic 8 ball response.')
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName('question')
|
||||
.setDescription('The question to ask the Magic 8 ball')
|
||||
.setRequired(true)
|
||||
);
|
||||
|
||||
const MAGIC_EIGHT_BALL_RESPONSES = [
|
||||
'As I see it, yes.',
|
||||
'Ask again later.',
|
||||
'Better not tell you now.',
|
||||
'Cannot predict now.',
|
||||
'Concentrate and ask again.',
|
||||
"Don't count on it.",
|
||||
'It is certain.',
|
||||
'It is decidedly so.',
|
||||
'Most likely.',
|
||||
'My reply is no.',
|
||||
'My sources say no.',
|
||||
'Outlook not so good.',
|
||||
'Outlook good.',
|
||||
'Reply hazy, try again.',
|
||||
'Signs point to yes.',
|
||||
'Very doubtful.',
|
||||
'Without a doubt.',
|
||||
'Yes.',
|
||||
'Yes - definitely.',
|
||||
'You may rely on it.',
|
||||
];
|
||||
|
||||
async function execute(interaction) {
|
||||
const randomIndex = Math.floor(
|
||||
Math.random() * MAGIC_EIGHT_BALL_RESPONSES.length
|
||||
);
|
||||
const response = MAGIC_EIGHT_BALL_RESPONSES[randomIndex];
|
||||
|
||||
await interaction.reply(response);
|
||||
}
|
||||
|
||||
export default { data, execute };
|
||||
Reference in New Issue
Block a user