Skip to content

Commit

Permalink
[Enhancement] added nicer embed message for the 8ball command, cleane…
Browse files Browse the repository at this point in the history
…d code from non used declarations
  • Loading branch information
naseif committed Aug 30, 2021
1 parent aa33587 commit ab89f06
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
19 changes: 12 additions & 7 deletions commands/fun/8ball.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { embedMessage } = require("../../modules/embedSimple");

module.exports = {
data: new SlashCommandBuilder()
Expand All @@ -10,6 +9,8 @@ module.exports = {
),
async execute(interaction, client) {
await interaction.deferReply();
const question = interaction.options.getString("ques");

const answers = [
"Aboslutely 👌",
"I am not sure, but maybe? 🤐",
Expand All @@ -22,13 +23,17 @@ module.exports = {
"That's a bit lewd 🤤",
];

const embed = {
color: "#9dcc37",
title: `${question}`,
author: {
name: `${interaction.user.username}`,
icon_url: `${interaction.user.avatarURL()}`,
},
description: `${answers[Math.floor(Math.random() * answers.length)]}`,
};
await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
`${answers[Math.floor(Math.random() * answers.length)]}`
),
],
embeds: [embed],
});
},
};
1 change: 0 additions & 1 deletion commands/fun/insult.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { embedMessage } = require("../../modules/embedSimple");
const fetch = require("node-fetch");

module.exports = {
Expand Down
1 change: 0 additions & 1 deletion commands/fun/jokes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { embedMessage } = require("../../modules/embedSimple");
const fetch = require("node-fetch");

module.exports = {
Expand Down

0 comments on commit ab89f06

Please sign in to comment.