Thumbnail Component V2

Hello, is it possible to add a thumbnail in the new ContainerBuilder ? I found this code in the doc :
const exampleContainer = new ContainerBuilder()
.setAccentColor(0x0099FF)
.addTextDisplayComponents(
textDisplay => textDisplay
.setContent('This text is inside a Text Display component! You can use **any __markdown__** available inside this component too.'),
)
.addActionRowComponents(
actionRow => actionRow
.setComponents(
new UserSelectMenuBuilder()
.setCustomId('exampleSelect')
.setPlaceholder('Select users'),
),
)
.addSeparatorComponents(
separator => separator,
)
.addSectionComponents(
section => section
.addTextDisplayComponents(
textDisplay => textDisplay
.setContent('This text is inside a Text Display component! You can use **any __markdown__** available inside this component too.'),
textDisplay => textDisplay
.setContent('And you can place one button or one thumbnail component next to it!'),
)
.setButtonAccessory(
button => button
.setCustomId('exampleButton')
.setLabel('Button inside a Section')
.setStyle(ButtonStyle.Primary),
),
);

await interaction.reply({
components: [exampleContainer],
flags: MessageFlags.IsComponentsV2,
});
const exampleContainer = new ContainerBuilder()
.setAccentColor(0x0099FF)
.addTextDisplayComponents(
textDisplay => textDisplay
.setContent('This text is inside a Text Display component! You can use **any __markdown__** available inside this component too.'),
)
.addActionRowComponents(
actionRow => actionRow
.setComponents(
new UserSelectMenuBuilder()
.setCustomId('exampleSelect')
.setPlaceholder('Select users'),
),
)
.addSeparatorComponents(
separator => separator,
)
.addSectionComponents(
section => section
.addTextDisplayComponents(
textDisplay => textDisplay
.setContent('This text is inside a Text Display component! You can use **any __markdown__** available inside this component too.'),
textDisplay => textDisplay
.setContent('And you can place one button or one thumbnail component next to it!'),
)
.setButtonAccessory(
button => button
.setCustomId('exampleButton')
.setLabel('Button inside a Section')
.setStyle(ButtonStyle.Primary),
),
);

await interaction.reply({
components: [exampleContainer],
flags: MessageFlags.IsComponentsV2,
});
6 Replies
ToStam
ToStamOP5mo ago
But when I add a thumbnail in the section, it don't work.
d.js toolkit
d.js toolkit5mo 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
ToStam
ToStamOP5mo ago
discord.js@14.21.0 NodeJS v22.17.0
toooast.
toooast.5mo ago
you either use button accessory or thumbnail, not both
d.js docs
d.js docs5mo ago
:method: SectionBuilder#setThumbnailAccessory() discord.js@14.21.0 Sets the accessory of this section to a thumbnail.
ToStam
ToStamOP5mo ago
Ok thanks !

Did you find this page helpful?