ActionRowBuilder in a new thread

Hello, how can I make an Action rows just after a thread creation ? I would like to moderate them and add after each new thread a row with two buttons ACCEPT / DECLINE. I'm looking into ActionRowBuilder but I don't know how to send that. is that the correct way to do ? Thanks (Another question : why the doc is so empty ?? Older docs was better to understand)
12 Replies
d.js toolkit
d.js toolkitā€¢12mo 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.
Nounejm
Nounejmā€¢12mo ago
<channel>.send({
content: 'Hello world',
components: [
new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
...,
new ButtonBuilder()
...
)
]
})
<channel>.send({
content: 'Hello world',
components: [
new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
...,
new ButtonBuilder()
...
)
]
})
this is how it should look like
Nounejm
Nounejmā€¢12mo ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
! GhostvOne.tv šŸ‘»šŸ‡«šŸ‡·
Thanks very much . But where did you see in the doc on how to use with send method ? I already seen this page, but didn't help me on how to use on another context
Nounejm
Nounejmā€¢12mo ago
you mean <channel>.send({ ... })?
! GhostvOne.tv šŸ‘»šŸ‡«šŸ‡·
I mean to use components with the channel.send method yes
Nounejm
Nounejmā€¢12mo ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
! GhostvOne.tv šŸ‘»šŸ‡«šŸ‡·
This new documentation is a nightmare šŸ˜® For exemple, with the older doc, I could see every method to use with the channel class
Nounejm
Nounejmā€¢12mo ago
you dont get how to send messages to channels?
! GhostvOne.tv šŸ‘»šŸ‡«šŸ‡·
Yes I understand, but I don't see anywhere where I could send components with a message. Now I know that because you explain me, but in the doc I don't see any of that
Nounejm
Nounejmā€¢12mo ago
you can anytime you can send it when replying to a message, editi g a message, sendimg message to a channel