Files
minzbot-v2/commands/testFeatures.js
2022-07-03 19:29:17 +02:00

30 lines
1.2 KiB
JavaScript

const { SlashCommandBuilder } = require("@discordjs/builders");
const Discord = require("discord.js");
module.exports = {
data: new SlashCommandBuilder()
.setName("testfeatures")
.setDescription("Generate test embed")
.addStringOption((option) =>
option
.setName("message")
.setDescription("Thy message")
.setRequired(true)
),
async execute(interaction) {
const testEmbed = new Discord.MessageEmbed()
.setColor("#FFFFFF")
.setTitle("Test Embed")
.setDescription(`Your test message: ${interaction.options.getString('message')}`)
.setImage(interaction.user.avatarURL({dynamic : true}))
const testRow = new Discord.MessageActionRow().addComponents(
new Discord.MessageButton()
.setCustomId('testButton')
.setLabel('Hello, this is buton')
.setStyle('DANGER')
);
await interaction.reply({embeds: [testEmbed], components: [testRow] });
}
}