Lanbot_Music/commands/core/choose.js

28 lines
891 B
JavaScript
Raw Normal View History

2022-04-03 04:34:37 +02:00
const { MessageEmbed, MessageAttachment } = require("discord.js");
module.exports = {
name: 'choose',
aliases: [],
utilisation: '{prefix}choose <choix1>,<choix2>',
execute(client, message) {
const arguments = message.content.split(/,+/g);
arguments.shift().toLowerCase();
const Response = Math.floor(Math.random() * arguments.length);
//const attachment = new MessageAttachment("./assets/choose.gif");
const embed = new MessageEmbed()
embed.setColor('RANDOM')
embed.setTitle("Commande Choose")
embed.addField('Par les pouvoirs qui me sont conférés.', `Je choisi : **${arguments[Response]}**`)
embed.setTimestamp();
embed.setImage("https://media.discordapp.net/attachments/924807447372247050/951251866010931301/choose.gif");
message.channel.send({ embeds: [embed] });
},
};