Add a /8ball command that answers questions randomly
Ask the Magic 8-Ball any yes/no question and receive a mystical answer!
Usage: /8ball question:<your question>
The 8-ball will respond with one of 20 classic answers:
Perfect for making important life decisions or just having fun with friends!
Made by MEE6. Remix it to get a copy of your own and change anything you like.
Question: Will I have a good day today?
Answer: Very doubtful.
Question: Should I start that new project?
Answer: Outlook not so good.
Question: Is pizza the best food?
Answer: It is certain.
// Magic 8-Ball command โ answers questions with classic 8-ball responses
const ANSWERS = [
// Positive
'It is certain.',
'It is decidedly so.',
'Without a doubt.',
'Yes definitely.',
'You may rely on it.',
'As I see it, yes.',
'Most likely.',
'Outlook good.',
'Yes.',
'Signs point to yes.',
// Non-committal
'Reply hazy, try again.',
'Ask again later.',
'Better not tell you now.',
'Cannot predict now.',
'Concentrate and ask again.',
// Negative
"Don't count on it.",
'My reply is no.',
'My sources say no.',
'Outlook not so good.',
'Very doubtful.',
];
mee6.command(
'8ball',
{
description: 'Ask the Magic 8-Ball a question',
options: [
{
name: 'question',
type: 'string',
description: 'Your question',
required: true,
},
],
},
async (ctx) => {
const question = ctx.option<string>('question');
const answer = ANSWERS[Math.floor(Math.random() * ANSWERS.length)];
await ctx.reply({
embed: {
title: '๐ฑ Magic 8-Ball',
description: `**Question:** ${question}\n\n**Answer:** ${answer}`,
color: '#5865F2',
},
});
}
);