Skip to content
GitHub

ResponseView

interface in meocord/interface Since 4.1.0

interface ResponseView

What a presenter renders for a loading view or an error.

MeoCord turns it into an embed, or into a Components V2 container on a Components V2 message.

Members

text

text: string

The main text.

title

title?: string

A heading above the text.

color

color?: ColorResolvable

The accent colour: the embed colour, or the container's accent.

emoji

emoji?: string

An emoji shown before the text, and on the clicked button while it loads.

components

components?: (
  APIComponentInContainer | JSONEncodable<APIComponentInContainer>
)[]

Further Components V2 content placed in the container, below the text and the view's files. Ignored in an embed.

files

files?: ResponseFile[]

Files sent with the view, such as an image the presenter drew. MeoCord shows them for you: in an embed, the first image is the embed's image; in a Components V2 container, images go in a gallery and other files below the text. A file the view's components already show by attachment://<name> is not shown again.

image

image?: string

The view's image, in place of its first image file: the name of one of its files, or a URL. In a container, it leads the gallery below the text.

thumbnail

thumbnail?: string

A small image beside the text: the name of one of its files, or a URL. In a container, the text's thumbnail.