Change math formula, add new answers

This commit is contained in:
IDeletedSystem64 2022-03-17 23:32:20 -05:00
parent 9940954ae9
commit 81a0a53ee0
1 changed files with 21 additions and 10 deletions

View File

@ -1,31 +1,42 @@
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!',
syntax: ["[Question]"],
execute(client, message, args) { execute(client, message, args) {
const {footerTxt} = require('../config.json');
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", "I don't think so.",
"Let me think about it first. No.",
"Let me think about it first. Yeah",
"Let me think about it first. Maybe",
"I don't know man",
"Maybe",
"I'm not sure",
"Ask again",
"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 even though anitrox doesn't seem to care 🙃 "Good idea!",
"Sure"
] ]
const index = Math.floor(Math.random() * (answers.length - 1) + 1); const index = Object.keys(answers)[Math.floor(Math.random() * Object.keys(answers).length)];
var question = args.slice(0).join(" ") var question = args.slice(0).join(" ")
var answer = (answers[index]); var answer = (answers[index]);
console.log(args); console.log(args);
if (!question) { if (!question) {
const embed = { const embed = {
"title": "<:AnitroxError:809651936563429416> Well that happened...", "title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
"description": "You need to specify a question!", "description": "You need to ask a",
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "placeholder" "text": footerTxt
} }
} }
} }
@ -34,8 +45,8 @@ module.exports = {
"description": "Your question: **" + question + "**", "description": "Your question: **" + question + "**",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "placeholder" "text": footerTxt
}, },
"fields": [ "fields": [