advmsgcmp_layout_section(Args{
accessory: func() {
advmsgcmp_media_image(Args{url: "https://example.com/media.png"})
},
})
Image
BlockAdvanced Messages
Single media item in a gallery or a thumbnail accessory.
Inputs
URLRequired
URL of the media item.
Example: https://example.com/media.png
Description
Alt text for the media, max 1024 characters.
Example: A beautiful sunset over the ocean.
Spoiler
Whether the media item should be a spoiler.
Example: true
Where it goes
Build a bot using blocks like Image
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
advmsgcmp_media_image- Can only be placed inside
advmsgcmp_layout_section(accessory),advmsgcmp_layout_gallery(children).
Inputs
| Field | InventScript name | Value |
|---|---|---|
| URL | url | e.g. "https://example.com/media.png" |
| Description | description | e.g. "A beautiful sunset over the ocean." |
| Spoiler | spoiler | e.g. "true" |
Example InventScript
More advanced messages blocks
TextText component.Message ContainerHolds text, thumbnails, galleries, and other content components.SectionHolds text alongside an accessory button or thumbnail.Action RowHolds up to 5 buttons or a single select component.SeparatorAdds vertical padding between message components, with an optional divider line.ButtonCreate a button for users to click on. Triggers with a new flow and Custom ID.GalleryTop-level container for 1-10 media items.String Select OptionOption item for a String Select component.String SelectString select menu for advanced messages and modals.User SelectUser select menu for advanced messages and modals.Role SelectRole select menu for advanced messages and modals.Mentionable SelectMentionable select menu for advanced messages and modals.Channel SelectChannel select menu for advanced messages and modals.