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 toolkit2y 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 docs2y 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
ProfessorOP2y ago
kk Once Edit Above Code And Sow Me Please
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Professor
ProfessorOP2y ago
Please Halp Anyone
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Professor
ProfessorOP2y ago
kk'
buttonRow.setDisabled(true).components[0]
buttonRow.setDisabled(true).components[0]
Not Working
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Professor
ProfessorOP2y ago
Kk
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server