Disabling Components

const buttonRow = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('NextFact')
.setCustomId('nxtfact')
.setStyle(ButtonStyle.Success),
)
const buttonRow = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('NextFact')
.setCustomId('nxtfact')
.setStyle(ButtonStyle.Success),
)
Set This Disabled After Sending. This Below Code Not Working.
i.update({ components: [buttonRow.components[0].setDisabled(true)] })
i.update({ components: [buttonRow.components[0].setDisabled(true)] })
10 Replies
d.js toolkit
d.js toolkit13mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
d.js docs
d.js docs13mo ago
Structures from the API cannot be edited directly. To do so, you can create a new structure (a builder) using the .from() method
const newEmbed = EmbedBuilder.from(embed).setTitle("title")
const newRow = ActionRowBuilder.from(row).addComponents(component)
const newEmbed = EmbedBuilder.from(embed).setTitle("title")
const newRow = ActionRowBuilder.from(row).addComponents(component)
Professor
Professor13mo ago
kk Once Edit Above Code And Sow Me Please
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
Professor
Professor13mo ago
Please Halp Anyone
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
Professor
Professor13mo ago
kk'
buttonRow.setDisabled(true).components[0]
buttonRow.setDisabled(true).components[0]
Not Working
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
Professor
Professor13mo ago
Kk
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View