2021-11-18 18:56:42 +01:00
|
|
|
const { MessageEmbed } = require("discord.js");
|
|
|
|
const questions = require("../../util/Data/wyr.json");
|
|
|
|
module.exports = {
|
|
|
|
name: "wyr",
|
|
|
|
description: "Send some would-you rather questions",
|
|
|
|
run: async (client, interaction, args) => {
|
|
|
|
const messagetext = questions[Math.floor(Math.random() * questions.length)];
|
|
|
|
const question = messagetext.split("Would you rather ")[1];
|
|
|
|
const q = question.split(" or ");
|
|
|
|
const Option1 = q[0];
|
|
|
|
const Option2 = q[1];
|
|
|
|
const embed = new MessageEmbed()
|
|
|
|
.setTitle("Would You Rather")
|
|
|
|
.setDescription(
|
|
|
|
`🇦 ${Option1} \n\n **OR** \n\n :regional_indicator_b: ${Option2}`
|
|
|
|
)
|
2022-03-02 15:37:01 +01:00
|
|
|
.setAuthor({
|
|
|
|
name: interaction.user.tag,
|
|
|
|
iconURL: interaction.user.displayAvatarURL({ dyamic: true }),
|
|
|
|
})
|
2021-11-18 18:56:42 +01:00
|
|
|
.setColor(client.color)
|
2022-03-02 15:37:01 +01:00
|
|
|
.setFooter({
|
|
|
|
text: `Made by ${client.author}`,
|
|
|
|
iconURL: client.user.displayAvatarURL(),
|
|
|
|
})
|
2021-11-18 18:56:42 +01:00
|
|
|
.setTimestamp();
|
|
|
|
wyrmessage = await interaction.followUp({ embeds: [embed] });
|
|
|
|
wyrmessage.react("🇦");
|
|
|
|
wyrmessage.react("🇧");
|
|
|
|
},
|
|
|
|
};
|