Getting a error and cannot figure out why

Im making a bot for Rust+ and im making a thing to edit smart devices names for in game and i keep getting a error when trying to show a action row and cannot figure out what is undefined. Here is my code
// interaction.update({ components: [], content: "Rename Smart Device" }) <--- commented this out to see if it would fix it and it didnt
let smartDevices = [];
let prevInfo = tempinteractions[interaction.user.id].rustplus;
for(var x in rustplususers[interaction.user.id].servers[prevInfo.server].smart) {
smartDevices.push(new djs.StringSelectMenuOptionBuilder().setLabel(`${rustplususers[interaction.user.id].servers[prevInfo.server].smart[x].type}: ${x}`).setValue(x))
}
console.log(smartDevices)
interaction.reply({
ephemeral: true, content: "", components: [new djs.ActionRowBuilder().setComponents(
new djs.StringSelectMenuBuilder().setCustomId("rpssmarteditold").setPlaceholder("Select a device to rename").setOptions(smartDevices),
new djs.TextInputBuilder().setCustomId("rpssmarteditnew").setPlaceholder("Enter a new name for the device").setMinLength(1).setMaxLength(24).setRequired(true).setLabel("New Smart Device Name")
)]
})
// interaction.update({ components: [], content: "Rename Smart Device" }) <--- commented this out to see if it would fix it and it didnt
let smartDevices = [];
let prevInfo = tempinteractions[interaction.user.id].rustplus;
for(var x in rustplususers[interaction.user.id].servers[prevInfo.server].smart) {
smartDevices.push(new djs.StringSelectMenuOptionBuilder().setLabel(`${rustplususers[interaction.user.id].servers[prevInfo.server].smart[x].type}: ${x}`).setValue(x))
}
console.log(smartDevices)
interaction.reply({
ephemeral: true, content: "", components: [new djs.ActionRowBuilder().setComponents(
new djs.StringSelectMenuBuilder().setCustomId("rpssmarteditold").setPlaceholder("Select a device to rename").setOptions(smartDevices),
new djs.TextInputBuilder().setCustomId("rpssmarteditnew").setPlaceholder("Enter a new name for the device").setMinLength(1).setMaxLength(24).setRequired(true).setLabel("New Smart Device Name")
)]
})
Attached the console picture
No description
2 Replies
d.js toolkit
d.js toolkit14mo 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 staff
16austin16
16austin16OP14mo ago
got it figured out. Was just being dumb and trying to use a text input in a normal message and not a modal
Want results from more Discord servers?
Add your server