Builders for components v2: text, images, files and containers laid out
in the message itself. Messages using them need the Lingo.Component.v2_flag/0
flag and can't have :content or :embeds.
Lingo.Api.Message.create(channel_id, %{
flags: Lingo.Component.v2_flag(),
components: [
Layout.container([Layout.text_display("**Server status**"), Layout.separator()],
accent_color: 0x57F287
)
]
})
Summary
Functions
A box around components, like an embed. Options: :accent_color and :spoiler.
An attached file, by attachment://name URL. Option: :spoiler.
One item of a media_gallery/1. Options: :description and :spoiler.
A grid of up to 10 images or videos, built with gallery_item/2.
Up to 3 text displays with an accessory (a button or a thumbnail) beside them.
Space between components. Options: :divider (draw a line) and :spacing (:small or :large).
Markdown text.
A small image, for a section's accessory. Options: :description and :spoiler.
A media reference by URL.
Functions
A box around components, like an embed. Options: :accent_color and :spoiler.
An attached file, by attachment://name URL. Option: :spoiler.
One item of a media_gallery/1. Options: :description and :spoiler.
A grid of up to 10 images or videos, built with gallery_item/2.
Up to 3 text displays with an accessory (a button or a thumbnail) beside them.
Space between components. Options: :divider (draw a line) and :spacing (:small or :large).
Markdown text.
A small image, for a section's accessory. Options: :description and :spoiler.
A media reference by URL.