Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = {
- data: new SlashCommandBuilder()
- .setName('embedcreator')
- .setDescription('This creates a custom embed')
- // Here we declare all three of our options for the author
- .addStringOption(Option =>
- Option
- .setName('author-name')
- .setDescription('This is the name of author of the embed')
- .setRequired(false)
- )
- .addStringOption(Option =>
- Option
- .setName('author-icon-url')
- .setDescription('This is the image URL of author of the embed')
- .setRequired(false)
- )
- .addStringOption(Option =>
- Option
- .setName('author-link')
- .setDescription('This is the clickable link of author of the embed')
- .setRequired(false)
- )
- async execute(interaction) {
- const embed = new EmbedBuilder()
- .setAuthor({
- // Now we will pass those directly into our embed
- name: interaction.options.getString('author-name'),
- iconURL: interaction.options.getString('author-icon-url'),
- url: interaction.options.getString('author-link')
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment