This repository has been archived on 2024-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
anitrox/commands/8ball.js

62 lines
2.0 KiB
JavaScript
Raw Normal View History

module.exports = {
name: '8ball',
description: 'Ask Anitrox a question, any question! and they will answer it!',
2022-03-17 23:32:20 -05:00
syntax: ["[Question]"],
execute(client, message, args) {
2022-03-17 23:32:20 -05:00
const {footerTxt} = require('../config.json');
const answers = [
"Heck no!",
"Are you crazy!? No!",
"Don't even think about it.",
"No! You might bork something!",
"Heck yeah",
2022-03-17 23:32:20 -05:00
"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!",
2022-03-17 23:32:20 -05:00
"Go for it! :smile:",
"Good idea!",
"Sure"
]
2022-03-17 23:32:20 -05:00
const index = Object.keys(answers)[Math.floor(Math.random() * Object.keys(answers).length)];
var question = args.slice(0).join(" ")
var answer = (answers[index]);
console.log(args);
if (!question) {
const embed = {
2022-03-17 23:32:20 -05:00
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
"description": "You need to ask a",
"color": 13632027,
"footer": {
2022-03-17 23:32:20 -05:00
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
}
}
}
const embed = {
"title": ":8ball: Anitrox 8 Ball",
"description": "Your question: **" + question + "**",
"color": 9442302,
"footer": {
2022-03-17 23:32:20 -05:00
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [
{
"name": "🤔 My Answer",
"value": answer
}
]
};
message.channel.send({ embed });
}
}