Skip to content

CreateMessageInput

Defined in: bot/bot.type.ts:501

What POST /channels/{id}/messages takes.

optional allowed_mentions?: object

Defined in: bot/bot.type.ts:511

Defaults to no mentions, so a pasted @everyone cannot ping anyone.

optional parse?: ("roles" | "users" | "everyone")[]

Which mention types Discord may resolve into pings.

optional roles?: string[]

Ids of the roles that may be pinged.

optional users?: string[]

Ids of the users that may be pinged.


content: string

Defined in: bot/bot.type.ts:503

The message text.


optional enforce_nonce?: boolean

Defined in: bot/bot.type.ts:507

Turns on the nonce de-duplication for nonce.


optional flags?: number

Defined in: bot/bot.type.ts:509

Message flags; see MessageFlag.


optional nonce?: string | number

Defined in: bot/bot.type.ts:505

With enforce_nonce, Discord drops a repeat of the same nonce, so a retry after a lost response cannot post twice.