Skip to content

const messages: object

Defined in: sdk/js/src/api.ts:12

Messages and reactions in channels the bot can see.

delete(channelId, messageId): void

string

string

void

dm(memberId, payload): object

A direct message to memberId (capability dms): opens the DM when needed. Returns the DM’s channel id and the message id.

string

MessagePayload

object

channelId: string

messageId: string

edit(channelId, messageId, payload): void

Edits one of the bot’s messages.

string

string

MessagePayload

void

history(channelId, options?): Message[]

Up to limit (1–100) messages before the sequence before.

string

number

number

Message[]

react(channelId, messageId, emoji): void

string

string

string

void

send(channelId, payload, options?): string

Posts a message; returns its id.

string

MessagePayload

string

string

unreact(channelId, messageId, emoji): void

string

string

string

void

upload(channelId, name, mime, bytes): string

Uploads a file for the bot’s next message (capability attachments); returns its id.

string

string

string

Uint8Array

string