Expand description
Request bodies and response types of the REST API.
These are plain data types; sending requests is the job of the djs-rest crate.
discord.js counterpart: the RESTPost…JSONBody / RESTGet…Result types of
discord-api-types.
Structs§
- Active
Threads - The response of List Active Guild Threads.
- AddGuild
Member - The body of Add Guild Member.
- AddLobby
Member - The body of Add a Member to a Lobby (D-134). The user is in the path; for a member already in the lobby, the fields that are set are updated.
- Archived
Threads - The response of the archived thread lists.
- Begin
Guild Prune - The body of Begin Guild Prune.
- Bulk
BanResponse - The response of Bulk Guild Ban.
- Bulk
Delete Messages - The body of Bulk Delete Messages
(
POST /channels/{channel.id}/messages/bulk-delete). - Bulk
Guild Ban - The body of Bulk Guild Ban.
- Bulk
Lobby Member - One entry of Bulk Update Lobby Members: a member to add or update, or one to remove (D-134).
- Bulk
Target Users - The body of Bulk-Add Target Users and Bulk-Delete Target Users.
- Channel
Pins - The response of Get Channel Pins.
- Create
Application Command - The body of Create Global Application Command and Create Guild Application Command, and one entry of the bulk overwrite endpoints.
- Create
Application Emoji - The body of Create Application Emoji.
- Create
Auto Moderation Rule - The body of Create Auto Moderation Rule.
- Create
Channel Invite - The body of Create Channel Invite.
- Create
Dm - The body of Create DM.
- Create
Followup Message - The body of Create Followup Message: the Execute Webhook body without the fields follow-ups do not support (D-107).
- Create
Group Dm - The body of Create Group DM.
- Create
Guild Ban - The body of Create Guild Ban.
- Create
Guild Channel - The body of Create Guild Channel.
- Create
Guild Emoji - The body of Create Guild Emoji.
- Create
Guild Role - The body of Create Guild Role.
- Create
Guild Scheduled Event - The body of Create Guild Scheduled Event.
- Create
Guild Soundboard Sound - The body of Create Guild Soundboard Sound.
- Create
Guild Sticker - The body of Create Guild Sticker.
- Create
Guild Template - The body of Create Guild Template.
- Create
Lobby - The body of Create Lobby.
- Create
Message - The body of Create Message
(
POST /channels/{channel.id}/messages). - Create
OrJoin Lobby - The body of Create or Join Lobby.
- Create
Stage Instance - The body of Create Stage Instance.
- Create
Test Entitlement - The body of Create Test Entitlement.
- Create
Webhook - The body of Create Webhook.
- Current
User Guild - A guild of the current user, as returned by Get Current User Guilds.
- Delete
Application Identity - The optional body of Delete Application Identity.
- Edit
Application Command - The body of Edit Global Application Command and Edit Guild Application Command.
- Edit
Application Command Permissions - The body of Edit Application Command Permissions.
- Edit
Channel Permissions - The body of Edit Channel Permissions: the permission overwrite of one role or member.
- Edit
Current Application - The body of Edit Current Application.
- Edit
Message - The body of Edit Message
(
PATCH /channels/{channel.id}/messages/{message.id}). - Edit
Webhook Message - The body of Edit Webhook Message, also used to edit the original response to an interaction and its follow-up messages.
- Execute
Webhook - The body of Execute Webhook: a message sent through a webhook.
- File
Upload - A file uploaded with a request, e.g. a message attachment.
- Follow
Announcement Channel - The body of Follow Announcement Channel.
- Forum
TagData - A forum tag in a
request (D-114): tags without an
idare created. - Forum
Thread - The response of Start Thread in Forum or Media Channel: the created post and its first message (D-115).
- Forum
Thread Message - The first message of a forum or media post (D-112).
- Gateway
- The response of Get Gateway
(
GET /gateway, D-136): where to connect to the gateway. Bots useGatewayBot, which also tells the shard count and session start limit. - Gateway
Bot - The response of Get Gateway Bot
(
GET /gateway/bot): where and how to connect to the gateway. - GetAnswer
Voters - The query of Get Answer Voters.
- GetApplication
Commands - The query of Get Global Application Commands and Get Guild Application Commands.
- GetApplication
Identities ByExternal Id - The query of Get Application Identities by External ID.
- GetChannel
Messages - The query of Get Channel Messages
(
GET /channels/{channel.id}/messages). Messages are returned newest first. - GetChannel
Permissions - The query of Get Channel Member Permissions and Get Channel Role Permissions.
- GetChannel
Pins - The query of Get Channel Pins
(
GET /channels/{channel.id}/messages/pins). Pins are returned newest first; to get the next page, pass thepinned_atof the last pin asbefore. - GetCurrent
User Guilds - The query of Get Current User Guilds.
- GetGuild
- The query of Get Guild.
- GetGuild
Audit Log - The query of Get Guild Audit Log.
- GetGuild
Bans - The query of Get Guild Bans.
- GetGuild
Prune Count - The query of Get Guild Prune Count.
- GetGuild
Scheduled Event - The query of Get Guild Scheduled Event.
- GetGuild
Scheduled Event Users - The query of Get Guild Scheduled Event Users.
- GetInvite
- The query of Get Invite.
- GetLobby
Messages - The query of Get Lobby Messages.
- GetReactions
- The query of Get Reactions
(
GET /channels/{channel.id}/messages/{message.id}/reactions/{emoji}). - GetThread
Member - The query of Get Thread Member.
- Group
DmAdd Recipient - The body of Group DM Add Recipient.
- List
Archived Threads - The query of List Public Archived Threads and List Private Archived Threads.
- List
Entitlements - The query of List Entitlements.
- List
Guild Members - The query of List Guild Members.
- List
Joined Private Archived Threads - The query of List Joined Private Archived Threads.
- List
Scheduled Events ForGuild - The query of List Scheduled Events for Guild.
- List
SkuSubscriptions - The query of List SKU Subscriptions.
- List
Thread Members - The query of List Thread Members.
- Lobby
Member Data - A member in the body of Create Lobby or Modify Lobby, or one to upsert with Bulk Update Lobby Members (D-134).
- Message
Search Results - The response of Search Guild Messages.
- Modify
Application Emoji - The body of Modify Application Emoji.
- Modify
Auto Moderation Rule - The body of Modify Auto Moderation Rule.
- Modify
Current Member - The body of Modify Current Member: the bot’s own guild profile.
- Modify
Current User - The body of Modify Current User.
- Modify
Current User Voice State - The body of Modify Current User Voice State.
- Modify
Group Dm - The body of Modify Channel for a group DM (D-109).
- Modify
Guild - The body of Modify Guild.
- Modify
Guild Channel - The body of Modify Channel for a guild channel (D-109).
- Modify
Guild Channel Position - One entry of Modify Guild Channel Positions.
- Modify
Guild Emoji - The body of Modify Guild Emoji.
- Modify
Guild Incident Actions - The body of Modify Guild Incident Actions.
- Modify
Guild Member - The body of Modify Guild Member.
- Modify
Guild Onboarding - The body of Modify Guild Onboarding.
- Modify
Guild Role - The body of Modify Guild Role.
- Modify
Guild Role Position - One entry of Modify Guild Role Positions.
- Modify
Guild Scheduled Event - The body of Modify Guild Scheduled Event.
- Modify
Guild Soundboard Sound - The body of Modify Guild Soundboard Sound.
- Modify
Guild Sticker - The body of Modify Guild Sticker.
- Modify
Guild Template - The body of Modify Guild Template.
- Modify
Guild Welcome Screen - The body of Modify Guild Welcome Screen.
- Modify
Guild Widget - The body of Modify Guild Widget.
- Modify
Lobby - The body of Modify Lobby.
- Modify
Stage Instance - The body of Modify Stage Instance.
- Modify
Thread - The body of Modify Channel for a thread (D-109).
- Modify
User Voice State - The body of Modify User Voice State.
- Modify
Webhook - The body of Modify Webhook
and Modify Webhook with Token (which does not accept
channel_id). - Onboarding
Prompt Data - An onboarding prompt in a request (D-118).
- Prompt
Option Data - A prompt option in a request (D-118): the emoji is given by its parts, as Discord requires here.
- Recurrence
Rule Data - How a scheduled event repeats, as sent to Discord (D-124): the settable fields of a
RecurrenceRule. - Search
Guild Members - The query of Search Guild Members.
- Search
Guild Messages - The query of Search Guild Messages
(
GET /guilds/{guild.id}/messages/search). Every filter is optional; list filters match any of their values. - Send
Lobby Message - The body of Send Lobby Message.
- Send
Soundboard Sound - The body of Send Soundboard Sound.
- Session
Start Limit - How many gateway sessions the bot may still start (session start limit object).
- SetVoice
Channel Status - The body of Set Voice Channel Status.
- Start
Thread From Message - The body of Start Thread from Message.
- Start
Thread InForum OrMedia Channel - The body of Start Thread in Forum or Media Channel: a post with its first message.
- Start
Thread Without Message - The body of Start Thread without Message.
- Update
Application Identity Profile - The body of Update Application Identity Profile.
- Vanity
Url - The response of Get Guild Vanity URL.
Enums§
- Error
Code - The JSON error code of an error response: what went wrong, in more detail than the HTTP status (D-097).
- Search
Author Type - An author type of a message search.
- Search
Embed Type - An embed type of a message search (broader than the embed types of messages).
- Search
Filter - A search filter value that includes or excludes matching messages (Discord writes an
exclusion with a leading
-). - Search
HasType - Something a message has, for a message search.
- Search
Sort Mode - A sort mode of a message search.
- Search
Sort Order - The direction of a message search’s sorting.
Type Aliases§
- Lobby
Metadata - String key/value pairs set by the app on a lobby, a member or a message.