Final 8ball, Thanks to @OfficialTCGMatt for helping with this.

This commit is contained in:
Anthony M 2021-02-05 21:59:24 -06:00 committed by GitHub
parent 23d34d8fdc
commit 8938536120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 38 additions and 37 deletions

View File

@ -1,38 +1,39 @@
module.exports = { module.exports = {
name: '8ball', name: '8ball',
description: 'Ask Anitrox a question, any question! and they will answer it!', description: 'Ask Anitrox a question, any question! and they will answer it!',
execute(client, message, args) { execute(client, message, args) {
const answers = [ const answers = [
"Heck no!", "Heck no!",
"Are you crazy? No!", "Are you crazy!? No!",
"Don't even think about it.", "Don't even think about it.",
"No! You might bork something!", "No! You might bork something!",
"Heck yeah", "Heck yeah",
"YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE", "YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
"Definitely!", "Definitely!",
"Go for it! :smile:" "Go for it! :smile:"
// This should have a 50/50 amount of yes and no answers for equality. // This should have a 50/50 amount of yes and no answers for equality even though anitrox doesn't seem to care 🙃
] ]
const index = Math.floor(Math.random() * (answers.length - 1) + 1); const index = Math.floor(Math.random() * (answers.length - 1) + 1);
const question = message.content var question = args.slice(0).join(" ")
var answer = (answers[index]); var answer = (answers[index]);
console.log(args);
const embed = {
"title": ":8ball: Anitrox 8 Ball", const embed = {
"description": "**" + question + "**", "title": ":8ball: Anitrox 8 Ball",
"color": 6942950, "description": "Your question: **" + question + "**",
"footer": { "color": 6942950,
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", "footer": {
"text": "Made with :heart: in Illinois | Anitrox (C) IDeletedSystem64 2018-2021" "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
}, "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
},
"fields": [
{ "fields": [
"name": "🤔 My Answer", {
"value": answer "name": "🤔 My Answer",
} "value": answer
] }
}; ]
message.channel.send({ embed }); };
} message.channel.send({ embed });
}
} }