Large image on display components
Guys, with this example code in the Display Components tab on the discord.js website, how do I add an image like .setImage did in the previous version? I saw some bots here that have large images, in addition to the thumbnail, how do I do it?
Example I mentioned above:
I know the .setThumbnailAcessory is for adding a thumbnail, but what about the large image, how do I do it?
27 Replies
:class: MediaGalleryBuilder
discord.js@14.21.0
A builder that creates API-compatible JSON data for a container.
:method: ContainerBuilder#addMediaGalleryComponents() discord.js@14.21.0
Adds media gallery components to this container.@monbrey I looked everywhere for how I can put the large image, like .setImage did in the previous version, but I can't find it :/
I literally just linked it above
Add a media gallery to the container
I know that, I can already add media gallery to the container, but I can only put thumbnails, I'm still having trouble finding how to put a large image, but thanks, I'll try to find it here.
No, media gallery is not thumbnails
That's a large as you'll get in a container
To make it easier for me to understand and find, to add a thumbnail is with .setThumbnailAccessory, and for a large image? Just to make it easier to find and understand here.
Large images aren't accessories... they're media galleries
container.addMediaGallery(gallery => gallery.addItems(images))
I understand, but unfortunately, even doing what is shown in the example, I am not able to get the large image to stay inside the embed, it always comes as an attachment, outside the embed.
That's generally an issue with the attachment referencing, not the component
What am I probably doing wrong?


You're not putting the media gallery in the container. Of course it's separate
You're sending it separate
:method: ContainerBuilder#addMediaGalleryComponents()
discord.js@14.21.0
Adds media gallery components to this container.That's the question, I'm having trouble putting the large image inside the container, like .setImage did in the old embeds.
^^^^^^^^^^^
I got it, thank you very much... another question, how do I place the buttons side by side in the session inside the container like in this example? I can only place them stacked, one on top of the other.

Instead of using a section. You can use an actionrow just as if it wasn't a container
like this?

Yes but instead of a select menu, just add buttons
That's exactly what I'm having trouble with... putting the buttons side by side
Just put buttons there
how do i switch to just buttons, side by side, in this new version of discord.js?
If you want buttons. Make a button
A select menu is something different
I got it, thank you very much.
