How to create multiple .addStringOptions

Needing to create multiple .addStringOptions, but it is not coming through after I refresh commands and start the bot, it just keeps showing the one (map)
const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('mapwipe')
.setDescription('Map Wipe Announcement')
.addStringOption(option =>
option
.setName('map')
.setDescription('Map URL'))
.addStringOption(option =>
option
.setName('map_thumbnail')
.setDescription('Map Thumbnail PNG')),

async execute(interaction) {
//await interaction.deferReply();

const truly = interaction.options.getString('map')
const thumb = interaction.options.getString('map_thumbnail')

const exampleEmbed = new EmbedBuilder()
.setColor(0xef2929)
.setTitle('Rust Map Wipe')
.setAuthor({ name: 'Dads After Dark', iconURL: 'https://i.imgur.com/dlecsVP.png', url: 'https://i.imgur.com/dlecsVP.png' })
.setDescription('Map Wipe Announcement')
.addFields(
{ name: `${thumb}`, value: `${truly}` },
//.addFields({ name: 'Inline field title', value: 'Some value here', inline: true })
)
.setImage('https://content.rustmaps.com/maps/247/81d3439dceb346fb96bbb1acb8f64044/thumbnail.png')
.setTimestamp()
//.setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/dlecsVP.png' });
//await wait(4_000);
await interaction.reply({ embeds: [exampleEmbed] })
},
};
const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('mapwipe')
.setDescription('Map Wipe Announcement')
.addStringOption(option =>
option
.setName('map')
.setDescription('Map URL'))
.addStringOption(option =>
option
.setName('map_thumbnail')
.setDescription('Map Thumbnail PNG')),

async execute(interaction) {
//await interaction.deferReply();

const truly = interaction.options.getString('map')
const thumb = interaction.options.getString('map_thumbnail')

const exampleEmbed = new EmbedBuilder()
.setColor(0xef2929)
.setTitle('Rust Map Wipe')
.setAuthor({ name: 'Dads After Dark', iconURL: 'https://i.imgur.com/dlecsVP.png', url: 'https://i.imgur.com/dlecsVP.png' })
.setDescription('Map Wipe Announcement')
.addFields(
{ name: `${thumb}`, value: `${truly}` },
//.addFields({ name: 'Inline field title', value: 'Some value here', inline: true })
)
.setImage('https://content.rustmaps.com/maps/247/81d3439dceb346fb96bbb1acb8f64044/thumbnail.png')
.setTimestamp()
//.setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/dlecsVP.png' });
//await wait(4_000);
await interaction.reply({ embeds: [exampleEmbed] })
},
};
No description
2 Replies
d.js toolkit
d.js toolkit9mo 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! - Marked as resolved by OP
Zach
ZachOP9mo ago
I sure did I waited until the bot stopped all the way just in case Not yet, let me try That was it, thanks!
Want results from more Discord servers?
Add your server