Orbit Developers

Messages

The message object

FieldTypeNotes
idstring
channel_idstring
authorUser
contentstringEmpty if the message only has files or cards
created_atnumber
edited_atnumber or null
reply_toobject or nullThe message this one replies to
pinned_atnumber or null
attachmentsarrayFiles. Bots can see them but can't download or upload files yet.
reactionsarrayEach has emoji, count, and me (true if your bot reacted)
kindstringdefault, or join for the line that welcomes a new member
embedsarrayCards
interactionobject or nullThe command this message answers: its id, command and user

reply_to has the original message's id, its author (null if it was deleted), the first 120 characters of its content, and how many attachments it has.

Get messages

GET/channels/{channel_id}/messages

Optional: limit (1–100, default 50), and before or after with a message ID. Oldest first.

GET/channels/{channel_id}/messages/{message_id}

One message.

Send a message

POST/channels/{channel_id}/messages

{ "content": "pong", "reply_to": "1234567890123456790" }

content is up to 2000 characters. It can be empty when you send embeds. reply_to is optional and has to be a message in the same channel. Needs SEND_MESSAGES. Returns 201 with the new message.

Edit a message

PATCH/channels/{channel_id}/messages/{message_id}

Send content, embeds or both. Whatever you leave out stays the same, and "embeds": [] removes the cards. Bots can only edit their own messages. Returns the updated message.

Delete a message

DELETE/channels/{channel_id}/messages/{message_id}

Your bot's own messages, or anyone's with MANAGE_MESSAGES. Returns 204.

Reactions

PUT/channels/{channel_id}/messages/{message_id}/reactions/{emoji}

DELETE/channels/{channel_id}/messages/{message_id}/reactions/{emoji}

Adds or removes your bot's reaction. URL-encode the emoji (👍 becomes %F0%9F%91%8D). Needs SEND_MESSAGES. Returns 204.

Pins

GET/channels/{channel_id}/pins

PUT/channels/{channel_id}/pins/{message_id}

DELETE/channels/{channel_id}/pins/{message_id}

Lists the pinned messages, or pins and unpins one. Pinning needs MANAGE_MESSAGES, and a channel holds up to 50 pins. Pin and unpin return 204.

Cards

A message can carry up to 4 cards:

{
  "content": "",
  "embeds": [
    {
      "title": "Weather in Tehran",
      "url": "https://example.com/tehran",
      "description": "Sunny all day",
      "color": 5995503,
      "fields": [
        { "name": "High", "value": "31°", "inline": true },
        { "name": "Low", "value": "18°", "inline": true }
      ],
      "footer": "Updated at noon"
    }
  ]
}
FieldLimitNotes
title256 characters
url500 charactershttp or https. Makes the title a link.
description2000 charactersFormatting and links work, like in messages
color0 to 0xFFFFFFThe stripe on the side, as a number
fields10Each has a name (256), a value (1024) and inline. Inline fields sit side by side.
footer256 characters

Every card needs a title, a description or fields, and all the text in a message's cards adds up to 6000 characters at most. Only bots send cards, and AutoMod checks their text and links like any other message.