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

38 lines
1.3 KiB
JavaScript
Raw Normal View History

2021-02-05 01:31:20 -06:00
module.exports = {
name: '8ball',
description: 'Ask Anitrox a question, any question! and they will answer it!',
execute(client, message, args) {
const answers = [
"Heck no!",
"Are you crazy? No!",
"Don't even think about it.",
"No! You might bork something!",
"Heck yeah",
"YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
"Definitely!",
"Go for it! :smile:"
// This should have a 50/50 amount of yes and no answers for equality.
]
const index = Math.floor(Math.random() * (answers.length - 1) + 1);
2021-02-05 01:52:39 -06:00
const question = message.content
2021-02-05 01:31:20 -06:00
var answer = (answers[index]);
const embed = {
"title": ":8ball: Anitrox 8 Ball",
2021-02-05 01:52:39 -06:00
"description": "**" + question + "**",
2021-02-05 01:31:20 -06:00
"color": 6942950,
"footer": {
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png",
"text": "Made with :heart: in Illinois | Anitrox (C) IDeletedSystem64 2018-2021"
},
2021-02-05 01:52:39 -06:00
2021-02-05 01:31:20 -06:00
"fields": [
{
2021-02-05 01:52:39 -06:00
"name": "🤔 My Answer",
"value": answer
2021-02-05 01:31:20 -06:00
}
]
};
message.channel.send({ embed });
}
}