Skip to content

MessageOptions

Defined in: sdk/js/src/message.ts:13

A message to send.

optional attachments?: string[]

Defined in: sdk/js/src/message.ts:18

Attachment ids from bot.messages.upload (or files uploaded for you by send).


optional components?: TopLevelComponent[]

Defined in: sdk/js/src/message.ts:16


optional componentsV2?: boolean

Defined in: sdk/js/src/message.ts:40

Lay the message out with Components V2 (content and embeds must be empty). Set automatically when a component other than an action row is used.


optional content?: string

Defined in: sdk/js/src/message.ts:14


optional embeds?: (EmbedBuilder | EmbedData)[]

Defined in: sdk/js/src/message.ts:15


optional ephemeral?: boolean

Defined in: sdk/js/src/message.ts:31

Only the invoker sees it (interaction replies and follow-ups only).


optional mentions?: object

Defined in: sdk/js/src/message.ts:24

Who is notified (each id once; ≤ 50 members, ≤ 20 roles). Zaun names mentions explicitly: the content only shows them (userMention(id), roleMention(id)). On an edit, absent leaves the mentions as they were, and {} clears them.

optional everyone?: boolean

optional members?: string[]

optional roles?: string[]


optional mentionsFromContent?: boolean

Defined in: sdk/js/src/message.ts:29

Also notify whoever content shows (<@id>, <@&id>, @everyone; see parseMentions). Only for text the bot wrote, never for text a member gave it.


optional silent?: boolean

Defined in: sdk/js/src/message.ts:33

Mentions do not notify.


optional suppressEmbeds?: boolean

Defined in: sdk/js/src/message.ts:35

Embeds are not shown.