Section errors

hey everyone, i'm currently experiencing with components v2 and i'm having a little trouble experimenting with Sections this is the code:
const section = new SectionBuilder()
.addTextDisplayComponents([
textDisplay
])
.setId(1)

const container = new ContainerBuilder()
/*.addTextDisplayComponents([
textDisplay
])*/
.addSectionComponents([
section
])
.setAccentColor(Colors.Red)

interaction.reply({
components: [container],
flags: [
MessageFlags.IsComponentsV2,
MessageFlags.Ephemeral
]
})
const section = new SectionBuilder()
.addTextDisplayComponents([
textDisplay
])
.setId(1)

const container = new ContainerBuilder()
/*.addTextDisplayComponents([
textDisplay
])*/
.addSectionComponents([
section
])
.setAccentColor(Colors.Red)

interaction.reply({
components: [container],
flags: [
MessageFlags.IsComponentsV2,
MessageFlags.Ephemeral
]
})
and this is the error i get: https://pastebin.com/zSQ9Qqwa
Pastebin
CombinedError: Received one or more errors at _UnionValidator.ha...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
4 Replies
d.js toolkit
d.js toolkit•5d 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
bob
bobOP•5d ago
[email protected] combined with node v22.14.0
Mafia
Mafia•5d ago
what does textDisplay look like
bob
bobOP•5d ago
const textDisplay = new TextDisplayBuilder()
.setContent("testing")
const textDisplay = new TextDisplayBuilder()
.setContent("testing")
yeah i figured that out as soon as you said that šŸ„€ thank you Qjuh

Did you find this page helpful?