Message Reference
Message Object
Represents a message sent in a channel within Discord.
Message Structure
Field | Type | Description |
---|---|---|
id | snowflake | id of the message |
channel_id | snowflake | id of the channel the message was sent in |
guild_id? | snowflake | id of the guild the message was sent in |
author* | user object | the author of this message (not guaranteed to be a valid user, see below) |
member?** | partial guild member object | member properties for this message's author |
content | string | contents of the message |
timestamp | ISO8601 timestamp | when this message was sent |
edited_timestamp | ?ISO8601 timestamp | when this message was edited (or null if never) |
tts | boolean | whether this was a TTS message |
mention_everyone | boolean | whether this message mentions everyone |
mentions*** | array of user objects, with an additional partial member field | users specifically mentioned in the message |
mention_roles | array of role object ids | roles specifically mentioned in this message |
mention_channels?**** | array of channel mention objects | channels specifically mentioned in this message |
attachments | array of attachment objects | any attached files |
embeds | array of embed objects | any embedded content |
reactions? | array of reaction objects | reactions to the message |
nonce? | integer or string | used for validating a message was sent |
pinned | boolean | whether this message is pinned |
webhook_id? | snowflake | if the message is generated by a webhook, this is the webhook's id |
type | integer | type of message |
activity? | message activity object | sent with Rich Presence-related chat embeds |
application? | partial application object | sent with Rich Presence-related chat embeds |
application_id? | snowflake | if the message is a response to an Interaction, this is the id of the interaction's application |
message_reference? | message reference object | data showing the source of a crosspost, channel follow add, pin, or reply message |
flags? | integer | message flags combined as a bitfield |
referenced_message?***** | ?message object | the message associated with the message_reference |
interaction? | message interaction object | sent if the message is a response to an Interaction |
thread? | channel object | the thread that was started from this message, includes thread member object |
components? | Array of message components | sent if the message contains components like buttons, action rows, or other interactive components |
sticker_items? | array of message sticker item objects | sent if the message contains stickers |
stickers? | array of sticker objects | Deprecated the stickers sent with the message |
* The author object follows the structure of the user object, but is only a valid user in the case where the message is generated by a user or bot user. If the message is generated by a webhook, the author object corresponds to the webhook's id, username, and avatar. You can tell if a message is generated by a webhook by checking for the webhook_id
on the message object.
** The member object exists in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels, provided that the author of the message is not a webhook. This allows bots to obtain real-time member data without requiring bots to store member state in memory.
*** The user objects in the mentions array will only have the partial member
field present in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels.
**** Not all channel mentions in a message will appear in mention_channels
. Only textual channels that are visible to everyone in a lurkable guild will ever be included. Only crossposted messages (via Channel Following) currently include mention_channels
at all. If no mentions in the message meet these requirements, this field will not be sent.
***** This field is only returned for messages with a type
of 19
(REPLY) or 21
(THREAD_STARTER_MESSAGE). If the message is a reply but the referenced_message
field is not present, the backend did not attempt to fetch the message that was being replied to, so its state is unknown. If the field exists but is null, the referenced message was deleted.
Message Types
Type | Value |
---|---|
DEFAULT | 0 |
RECIPIENT_ADD | 1 |
RECIPIENT_REMOVE | 2 |
CALL | 3 |
CHANNEL_NAME_CHANGE | 4 |
CHANNEL_ICON_CHANGE | 5 |
CHANNEL_PINNED_MESSAGE | 6 |
GUILD_MEMBER_JOIN | 7 |
USER_PREMIUM_GUILD_SUBSCRIPTION | 8 |
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 | 9 |
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 | 10 |
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 | 11 |
CHANNEL_FOLLOW_ADD | 12 |
GUILD_DISCOVERY_DISQUALIFIED | 14 |
GUILD_DISCOVERY_REQUALIFIED | 15 |
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING | 16 |
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING | 17 |
THREAD_CREATED | 18 |
REPLY | 19 |
APPLICATION_COMMAND | 20 |
THREAD_STARTER_MESSAGE | 21 |
GUILD_INVITE_REMINDER | 22 |
Message Activity Structure
Field | Type | Description |
---|---|---|
type | integer | type of message activity |
party_id? | string | party_id from a Rich Presence event |
Message Activity Types
Type | Value |
---|---|
JOIN | 1 |
SPECTATE | 2 |
LISTEN | 3 |
JOIN_REQUEST | 5 |
Message Flags
Flag | Value | Description |
---|---|---|
CROSSPOSTED | 1 << 0 | this message has been published to subscribed channels (via Channel Following) |
IS_CROSSPOST | 1 << 1 | this message originated from a message in another channel (via Channel Following) |
SUPPRESS_EMBEDS | 1 << 2 | do not include any embeds when serializing this message |
SOURCE_MESSAGE_DELETED | 1 << 3 | the source message for this crosspost has been deleted (via Channel Following) |
URGENT | 1 << 4 | this message came from the urgent message system |
HAS_THREAD | 1 << 5 | this message has an associated thread, with the same id as the message |
EPHEMERAL | 1 << 6 | this message is only visible to the user who invoked the Interaction |
LOADING | 1 << 7 | this message is an Interaction Response and the bot is "thinking" |
Example Message
json
{"reactions": [{"count": 1,"me": false,"emoji": {"id": null,"name": "🔥"}}],"attachments": [],"tts": false,"embeds": [],"timestamp": "2017-07-11T17:27:07.299000+00:00","mention_everyone": false,"id": "334385199974967042","pinned": false,"edited_timestamp": null,"author": {"username": "Mason","discriminator": "9999","id": "53908099506183680","avatar": "a_bab14f271d565501444b2ca3be944b25"},"mention_roles": [],"content": "Supa Hot","channel_id": "290926798999357250","mentions": [],"type": 0}
Example Crossposted Message
json
{"reactions": [{"count": 1,"me": false,"emoji": {"id": null,"name": "🔥"}}],"attachments": [],"tts": false,"embeds": [],"timestamp": "2017-07-11T17:27:07.299000+00:00","mention_everyone": false,"id": "334385199974967042","pinned": false,"edited_timestamp": null,"author": {"username": "Mason","discriminator": "9999","id": "53908099506183680","avatar": "a_bab14f271d565501444b2ca3be944b25"},"mention_roles": [],"mention_channels": [{"id": "278325129692446722","guild_id": "278325129692446720","name": "big-news","type": 5}],"content": "Big news! In this <#278325129692446722> channel!","channel_id": "290926798999357250","mentions": [],"type": 0,"flags": 2,"message_reference": {"channel_id": "278325129692446722","guild_id": "278325129692446720","message_id": "306588351130107906"}}
Message Reference Object
Message Reference Structure
Field | Type | Description |
---|---|---|
message_id? | snowflake | id of the originating message |
channel_id? * | snowflake | id of the originating message's channel |
guild_id? | snowflake | id of the originating message's guild |
fail_if_not_exists? | boolean | when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true |
* channel_id
is optional when creating a reply, but will always be present when receiving an event/response that includes this data model.
Message Types
There are multiple message types that have a message_reference object. Since message references are generic attribution to a previous message, there will be more types of messages which have this information in the future.
Crosspost messages
- These are messages that originated from another channel (IS_CROSSPOST flag).
- These messages have all three fields, with data of the original message that was crossposted.
Channel Follow Add messages
- These are automatic messages sent when a channel is followed into the current channel (type 12).
- These messages have the
channel_id
andguild_id
fields, with data of the followed announcement channel.
Pin messages
- These are automatic messages sent when a message is pinned (type 6).
- These messages have
message_id
andchannel_id
, andguild_id
if it is in a guild, with data of the message that was pinned.
Replies
- These are messages replying to a previous message (type 19).
- These messages have
message_id
andchannel_id
, andguild_id
if it is in a guild, with data of the message that was replied to. The channel_id and guild_id will be the same as the reply. - Replies are created by including a message_reference when sending a message. When sending, only
message_id
is required.
Thread starter messsage
- These are the first message in a public thread. They point back to the message in the parent channel from which the thread was started (type 21)
- These messages have
message_id
,channel_id
, andguild_id
. - These messages will never have content, embeds, or attachments, mainly just the
message_reference
andreferenced_message
fields.
Followed Channel Object
Followed Channel Structure
Field | Type | Description |
---|---|---|
channel_id | snowflake | source channel id |
webhook_id | snowflake | created target webhook id |
Reaction Object
Reaction Structure
Field | Type | Description |
---|---|---|
count | integer | times this emoji has been used to react |
me | boolean | whether the current user reacted using this emoji |
emoji | partial emoji object | emoji information |
Embed Object
Embed Structure
Field | Type | Description |
---|---|---|
title? | string | title of embed |
type? | string | type of embed (always "rich" for webhook embeds) |
description? | string | description of embed |
url? | string | url of embed |
timestamp? | ISO8601 timestamp | timestamp of embed content |
color? | integer | color code of the embed |
footer? | embed footer object | footer information |
image? | embed image object | image information |
thumbnail? | embed thumbnail object | thumbnail information |
video? | embed video object | video information |
provider? | embed provider object | provider information |
author? | embed author object | author information |
fields? | array of embed field objects | fields information |
Embed Types
Embed types are "loosely defined" and, for the most part, are not used by our clients for rendering. Embed attributes power what is rendered. Embed types should be considered deprecated and might be removed in a future API version.
Type | Description |
---|---|
rich | generic embed rendered from embed attributes |
image | image embed |
video | video embed |
gifv | animated gif image embed rendered as a video embed |
article | article embed |
link | link embed |
Embed Thumbnail Structure
Field | Type | Description |
---|---|---|
url? | string | source url of thumbnail (only supports http(s) and attachments) |
proxy_url? | string | a proxied url of the thumbnail |
height? | integer | height of thumbnail |
width? | integer | width of thumbnail |
Embed Video Structure
Field | Type | Description |
---|---|---|
url? | string | source url of video |
proxy_url? | string | a proxied url of the video |
height? | integer | height of video |
width? | integer | width of video |
Embed Image Structure
Field | Type | Description |
---|---|---|
url? | string | source url of image (only supports http(s) and attachments) |
proxy_url? | string | a proxied url of the image |
height? | integer | height of image |
width? | integer | width of image |
Embed Provider Structure
Field | Type | Description |
---|---|---|
name? | string | name of provider |
url? | string | url of provider |
Embed Author Structure
Field | Type | Description |
---|---|---|
name? | string | name of author |
url? | string | url of author |
icon_url? | string | url of author icon (only supports http(s) and attachments) |
proxy_icon_url? | string | a proxied url of author icon |
Embed Footer Structure
Field | Type | Description |
---|---|---|
text | string | footer text |
icon_url? | string | url of footer icon (only supports http(s) and attachments) |
proxy_icon_url? | string | a proxied url of footer icon |
Embed Field Structure
Field | Type | Description |
---|---|---|
name | string | name of the field |
value | string | value of the field |
inline? | boolean | whether or not this field should display inline |
Attachment Object
Attachment Structure
Field | Type | Description |
---|---|---|
id | snowflake | attachment id |
filename | string | name of file attached |
content_type? | string | the attachment's media type |
size | integer | size of file in bytes |
url | string | source url of file |
proxy_url | string | a proxied url of file |
height? | ?integer | height of file (if image) |
width? | ?integer | width of file (if image) |
Channel Mention Object
Channel Mention Structure
Field | Type | Description |
---|---|---|
id | snowflake | id of the channel |
guild_id | snowflake | id of the guild containing the channel |
type | integer | the type of channel |
name | string | the name of the channel |
Allowed Mentions Object
The allowed mention field allows for more granular control over mentions without various hacks to the message content. This will always validate against message content to avoid phantom pings (e.g. to ping everyone, you must still have @everyone
in the message content), and check against user/bot permissions.
Allowed Mention Types
Type | Value | Description |
---|---|---|
Role Mentions | "roles" | Controls role mentions |
User Mentions | "users" | Controls user mentions |
Everyone Mentions | "everyone" | Controls @everyone and @here mentions |
Allowed Mentions Structure
Field | Type | Description |
---|---|---|
parse | array of allowed mention types | An array of allowed mention types to parse from the content. |
roles | list of snowflakes | Array of role_ids to mention (Max size of 100) |
users | list of snowflakes | Array of user_ids to mention (Max size of 100) |
replied_user | boolean | For replies, whether to mention the author of the message being replied to (default false) |
Allowed Mentions Reference
Due to the complexity of possibilities, we have included a set of examples and behavior for the allowed mentions field.
If allowed_mentions
is not passed in (i.e. the key does not exist), the mentions will be parsed via the content. This corresponds with existing behavior.
In the example below we would ping @here (and also @role124 and @user123)
json
{"content": "@here Hi there from <@123>, cc <@&124>"}
To suppress all mentions in a message use:
json
{"content": "@everyone hi there, <@&123>","allowed_mentions": {"parse": []}}
This will suppress all mentions in the message (no @everyone or user mention).
The parse
field is mutually exclusive with the other fields. In the example below, we would ping users 123
and role 124
, but not @everyone. Note that passing a Falsy
value ([], null) into the "users" field does not trigger a validation error.
json
{"content": "@everyone <@123> <@&124>","allowed_mentions": {"parse": ["users", "roles"],"users": []}}
In the next example, we would ping @everyone, (and also users 123
and 124
if they suppressed
@everyone mentions), but we would not ping any roles.
json
{"content": "@everyone <@123> <@124> <@125> <@&200>","allowed_mentions": {"parse": ["everyone"],"users": ["123", "124"]}}
Due to possible ambiguities, not all configurations are valid. An invalid configuration is as follows
json
{"content": "@everyone <@123> <@124> <@125> <@&200>","allowed_mentions": {"parse": ["users"],"users": ["123", "124"]}}
Because parse: ["users"]
and users: [123, 124]
are both present, we would throw a validation error.
This is because the conditions cannot be fulfilled simultaneously (they are mutually exclusive).
Any entities with an ID included in the list of IDs can be mentioned. Note that the IDs of entities not present in the message's content will simply be ignored. e.g. The following example is valid, and would mention user 123, but not user 125 since there is no mention of user 125 in the content.
json
{"content": "<@123> Time for some memes.","allowed_mentions": {"users": ["123", "125"]}}
Embed Limits
To facilitate showing rich content, rich embeds do not follow the traditional limits of message content. However, some limits are still in place to prevent excessively large embeds. The following table describes the limits:
Limits
All of the following limits are measured inclusively. Leading and trailing whitespace characters are not included (they are trimmed automatically).
Field | Limit |
---|---|
title | 256 characters |
description | 4096 characters |
fields | Up to 25 field objects |
field.name | 256 characters |
field.value | 1024 characters |
footer.text | 2048 characters |
author.name | 256 characters |
Additionally, the characters in all title
, description
, field.name
, field.value
, footer.text
, and author.name
fields must not exceed 6000 characters in total. Violating any of these constraints will result in a Bad Request
response.
Endpoints
Get Channel Messages
GET
/channels/{channel.id}/messages
Returns the messages for a channel. If operating on a guild channel, this endpoint requires the VIEW_CHANNEL
permission to be present on the current user. If the current user is missing the 'READ_MESSAGE_HISTORY' permission in the channel then this will return no messages (since they cannot read the message history). Returns an array of message objects on success.
Query String Params
Field | Type | Description | Required | Default |
---|---|---|---|---|
around | snowflake | get messages around this message ID | false | absent |
before | snowflake | get messages before this message ID | false | absent |
after | snowflake | get messages after this message ID | false | absent |
limit | integer | max number of messages to return (1-100) | false | 50 |
Get Channel Message
GET
/channels/{channel.id}/messages/{message.id}
Returns a specific message in the channel. If operating on a guild channel, this endpoint requires the 'READ_MESSAGE_HISTORY' permission to be present on the current user. Returns a message object on success.
Create Message
POST
/channels/{channel.id}/messages
Post a message to a guild text or DM channel. Returns a message object. Fires a Message Create Gateway event. See message formatting for more information on how to properly format messages.
Limitations
- When operating on a guild channel, the current user must have the
SEND_MESSAGES
permission. - When sending a message with
tts
(text-to-speech) set totrue
, the current user must have theSEND_TTS_MESSAGES
permission. - When creating a message as a reply to another message, the current user must have the
READ_MESSAGE_HISTORY
permission.- The referenced message must exist and cannot be a system message.
- The maximum request size when sending a message is 8MB
- For the embed object, you can set every field except
type
(it will berich
regardless of if you try to set it),provider
,video
, and anyheight
,width
, orproxy_url
values for images. - Files can only be uploaded when using the
multipart/form-data
content type.
You may create a message as a reply to another message. To do so, include a message_reference
with a message_id
. The channel_id
and guild_id
in the message_reference
are optional, but will be validated if provided.
JSON/Form Params
Field | Type | Description | Required |
---|---|---|---|
content | string | the message contents (up to 2000 characters) | one of content, file, embed(s), sticker_ids |
tts | boolean | true if this is a TTS message | false |
file | file contents | the contents of the file being sent | one of content, file, embed(s), sticker_ids |
embeds | array of embed objects | embedded rich content (up to 6000 characters) | one of content, file, embed(s), sticker_ids |
embed (deprecated) | embed object | embedded rich content, deprecated in favor of embeds | one of content, file, embed(s), sticker_ids |
payload_json | string | JSON encoded body of non-file params | multipart/form-data only |
allowed_mentions | allowed mention object | allowed mentions for the message | false |
message_reference | message reference | include to make your message a reply | false |
components | array of message component objects | the components to include with the message | false |
sticker_ids | array of snowflakes | IDs of up to 3 stickers in the server to send in the message | one of content, file, embed(s), sticker_ids |
Example Request Body (application/json)
json
{"content": "Hello, World!","tts": false,"embeds": [{"title": "Hello, Embed!","description": "This is an embedded message."}]}
Example Request Bodies (multipart/form-data)
Note that these examples are small sections of an HTTP request to demonstrate behaviour of this endpoint - client libraries will set their own form boundaries, boundary
is just an example. For more information, refer to the multipart/form-data spec.
This example demonstrates usage of the endpoint without payload_json
.
-boundaryContent-Disposition: form-data; name="content"Hello, World!-boundaryContent-Disposition: form-data; name="tts"true-boundary--
This example demonstrates usage of the endpoint with payload_json
and all content fields (content
, embeds
, file
) set.
-boundaryContent-Disposition: form-data; name="payload_json"Content-Type: application/json{"content": "Hello, World!","embeds": [{"title": "Hello, Embed!","description": "This is an embedded message."}],"message_reference": {"message_id": "233648473390448641"}}-boundaryContent-Disposition: form-data; name="file"; filename="myfilename.png"Content-Type: image/png[image bytes]-boundary--
Using Attachments within Embeds
You can upload attachments when creating a message and use those attachments within your embed. To do this, you will want to upload files as part of your multipart/form-data
body. Make sure that you're uploading files that contain a filename, as you will need a filename to reference against.
In the embed object, you can then set an image to use an attachment as its url with our attachment scheme syntax: attachment://filename.png
For example:
json
{"embeds": [{"image": {"url": "attachment://screenshot.png"}}]}
Crosspost Message
POST
/channels/{channel.id}/messages/{message.id}/crosspost
Crosspost a message in a News Channel to following channels. This endpoint requires the 'SEND_MESSAGES' permission, if the current user sent the message, or additionally the 'MANAGE_MESSAGES' permission, for all other messages, to be present for the current user.
Returns a message object.
Create Reaction
PUT
/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me
Create a reaction for the message. This endpoint requires the 'READ_MESSAGE_HISTORY' permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the 'ADD_REACTIONS' permission to be present on the current user. Returns a 204 empty response on success.
The emoji
must be URL Encoded or the request will fail with 10014: Unknown Emoji
. To use custom emoji, you must encode it in the format name:id
with the emoji name and emoji id.
Delete Own Reaction
DELETE
/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me
Delete a reaction the current user has made for the message. Returns a 204 empty response on success.
The emoji
must be URL Encoded or the request will fail with 10014: Unknown Emoji
. To use custom emoji, you must encode it in the format name:id
with the emoji name and emoji id.
Delete User Reaction
DELETE
/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}
Deletes another user's reaction. This endpoint requires the 'MANAGE_MESSAGES' permission to be present on the current user. Returns a 204 empty response on success.
The emoji
must be URL Encoded or the request will fail with 10014: Unknown Emoji
. To use custom emoji, you must encode it in the format name:id
with the emoji name and emoji id.
Get Reactions
GET
/channels/{channel.id}/messages/{message.id}/reactions/{emoji}
Get a list of users that reacted with this emoji. Returns an array of user objects on success.
The emoji
must be URL Encoded or the request will fail with 10014: Unknown Emoji
. To use custom emoji, you must encode it in the format name:id
with the emoji name and emoji id.
Query String Params
Field | Type | Description | Required | Default |
---|---|---|---|---|
after | snowflake | get users after this user ID | false | absent |
limit | integer | max number of users to return (1-100) | false | 25 |
Delete All Reactions
DELETE
/channels/{channel.id}/messages/{message.id}/reactions
Deletes all reactions on a message. This endpoint requires the 'MANAGE_MESSAGES' permission to be present on the current user. Fires a Message Reaction Remove All Gateway event.
Delete All Reactions for Emoji
DELETE
/channels/{channel.id}/messages/{message.id}/reactions/{emoji}
Deletes all the reactions for a given emoji on a message. This endpoint requires the MANAGE_MESSAGES
permission to be present on the current user. Fires a Message Reaction Remove Emoji Gateway event.
The emoji
must be URL Encoded or the request will fail with 10014: Unknown Emoji
. To use custom emoji, you must encode it in the format name:id
with the emoji name and emoji id.
Edit Message
PATCH
/channels/{channel.id}/messages/{message.id}
Edit a previously sent message. The fields content
, embeds
, and flags
can be edited by the original message author. Other users can only edit flags
and only if they have the MANAGE_MESSAGES
permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags
documented in the table below may be modified by users (unsupported flag changes are currently ignored without error).
When the content
field is edited, the mentions
array in the message object will be reconstructed from scratch based on the new content. The allowed_mentions
field of the edit request controls how this happens. If there is no explicit allowed_mentions
in the edit request, the content will be parsed with default allowances, that is, without regard to whether or not an allowed_mentions
was present in the request that originally created the message.
Returns a message object. Fires a Message Update Gateway event.
JSON/Form Params
Field | Type | Description |
---|---|---|
content | string | the message contents (up to 2000 characters) |
embeds | array of embed objects | embedded rich content (up to 6000 characters) |
embed (deprecated) | embed object | embedded rich content, deprecated in favor of embeds |
flags | integer | edit the flags of a message (only SUPPRESS_EMBEDS can currently be set/unset) |
file | file contents | the contents of the file being sent/edited |
payload_json | string | JSON encoded body of non-file params (multipart/form-data only) |
allowed_mentions | allowed mention object | allowed mentions for the message |
attachments | array of attachment objects | attached files to keep |
components | array of message component | the components to include with the message |
Delete Message
DELETE
/channels/{channel.id}/messages/{message.id}
Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the MANAGE_MESSAGES
permission. Returns a 204 empty response on success. Fires a Message Delete Gateway event.
Bulk Delete Messages
POST
/channels/{channel.id}/messages/bulk-delete
Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the MANAGE_MESSAGES
permission. Returns a 204 empty response on success. Fires a Message Delete Bulk Gateway event.
Any message IDs given that do not exist or are invalid will count towards the minimum and maximum message count (currently 2 and 100 respectively).
JSON Params
Field | Type | Description |
---|---|---|
messages | array of snowflakes | an array of message ids to delete (2-100) |
Get Pinned Messages
GET
/channels/{channel.id}/pins
Returns all pinned messages in the channel as an array of message objects.
Pin Message
PUT
/channels/{channel.id}/pins/{message.id}
Pin a message in a channel. Requires the MANAGE_MESSAGES
permission. Returns a 204 empty response on success.
Unpin Message
DELETE
/channels/{channel.id}/pins/{message.id}
Unpin a message in a channel. Requires the MANAGE_MESSAGES
permission. Returns a 204 empty response on success.