How do I make the description and so on of the embed an option when putting in the command

const { SlashCommandBuilder } = require('discord.js'); const Discord = require('discord.js') const data = new SlashCommandBuilder() .setName("event") .setDescription("test!"); const specificTime = 1708762800 * 1000; const embed = new Discord.EmbedBuilder() .setDescription(__EVENT__\n__2v2 Fireball Fight Tournament__\n**-Server**: EU Practice (eu.minemen.club)\n**-Time**: <t:${specificTime / 1000}> (<t:${specificTime / 1000}:R>)\n-**Prize**: ACE [/disguise]) .setTimestamp(specificTime) .setColor('#f35b0d')
.setFooter({ text: 'Minemen Club'}); module.exports = { data, async execute(interaction) { await interaction.reply({embeds: [embed]}); }, };```
3 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
probablyraging
probablyraging4mo ago
Add some string options to your command, get the string and pass it to the embed
d.js docs
d.js docs4mo ago
:method: SlashCommandBuilder#addStringOption() Adds a string option :method: CommandInteractionOptionResolver#getString() Gets a string option.