Skip to content
Components & Interactions addMediaItem

$addMediaItem — Adds a new media gallery item

Adds a new media gallery item

Syntax

$addMediaItem[url;(description);(spoiler)]

Parameters

  • url (text, required) — The url for the media item
  • description (text, optional) — The description of the media item
  • spoiler (boolean, optional) — Whether to set a spoiler

Return Value

  • String.

Usage

$addMediaItem[url;(description);(spoiler)] → result

Example

$addMediaGallery[g]$addMediaItem[https://example.com/a.png;Picture;true]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.