Skip to content

Message

Definitions

Message

FIELDTYPEDESCRIPTION
idstringmessage id
contentstringmessage content
channelChannel?channel object
guildGuild?guild object
memberGuildMember?guild member object
userUser?user object
created_atnumber?timestamp of message creation
updated_atnumber?timestamp of message update

API

Create Message

POST /message.create
FIELDTYPEDESCRIPTION
channel_idstringchannel id
contentstringmessage content

Send (create) a message. Returns an array of Message objects.

Get Message

POST /message.get
FIELDTYPEDESCRIPTION
channel_idstringchannel id
message_idstringmessage id

Get a message by id. Returns a Message object. Required resources: channel, user.

Delete Message

POST /message.delete
FIELDTYPEDESCRIPTION
channel_idstringchannel id
message_idstringmessage id

Delete a specific message.

Update Message

POST /message.update
FIELDTYPEDESCRIPTION
channel_idstringchannel id
message_idstringmessage id
contentstringmessage content

Edit (update) a specific message.

Get Message List

POST /message.list
FIELDTYPEDESCRIPTION
channel_idstringchannel id
message_idstringmessage id
nextstring?pagination token
directionDirection?query direction
limitnumber?result limit
orderOrder?result order

Get the list of messages in a channel. Returns a bidirectional paginated list of Message objects. Required resource: user.

  • The next parameter defaults to null, indicating the query starts from the latest message. In this case, the direction parameter can only be before.
  • The direction parameter defaults to before.
  • The order parameter defaults to asc (regardless of query direction).
  • The default value of the limit parameter aligns with the platform's default. If the platform API does not specify a default, it can be set independently, with a recommended value of 50. If the user-provided value exceeds the platform's limit, the platform's upper limit should be used instead of returning an error. Developers should use the presence of prev or next in the response to determine if more data exists, rather than relying on the length of the data in the response.

Events

message-created

Triggered when a message is created. Required resources: channel, message, user.

message-updated

Triggered when a message is updated. Required resources: channel, message, user.

message-deleted

Triggered when a message is deleted. Required resources: channel, message, user.