{ "components": { "schemas": { "Application": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of the app" }, "name": { "type": "string", "description": "the name of the app" }, "icon": { "type": "string", "description": "the [icon hash](#DOCS_REFERENCE/image-formatting) of the app" }, "description": { "type": "string", "description": "the description of the app" }, "rpc_origins": { "type": "array", "description": "an array of rpc origin urls, if rpc is enabled", "items": { "type": "string" } }, "bot_public": { "type": "boolean", "description": "when false only app owner can join the app's bot to guilds" }, "bot_require_code_grant": { "type": "boolean", "description": "when true the app's bot will only join upon completion of the full oauth2 code grant flow" }, "terms_of_service_url": { "type": "string", "description": "the url of the app's terms of service" }, "privacy_policy_url": { "type": "string", "description": "the url of the app's privacy policy" }, "owner": { "$ref": "#/components/schemas/User", "description": "partial user object containing info on the owner of the application" }, "verify_key": { "type": "string", "description": "the hex encoded key for verification in interactions and the GameSDK's [GetTicket](#DOCS_GAME_SDK_APPLICATIONS/getticket)" }, "team": { "$ref": "#/components/schemas/Team", "description": "if the application belongs to a team, this will be a list of the members of that team" }, "guild_id": { "type": "string", "description": "if this application is a game sold on Discord, this field will be the guild to which it has been linked" }, "primary_sku_id": { "type": "string", "description": "if this application is a game sold on Discord, this field will be the id of the \"Game SKU\" that is created, if exists" }, "slug": { "type": "string", "description": "if this application is a game sold on Discord, this field will be the URL slug that links to the store page" }, "cover_image": { "type": "string", "description": "the application's default rich presence invite [cover image hash](#DOCS_REFERENCE/image-formatting)" }, "flags": { "type": "integer", "description": "the application's public [flags](#DOCS_RESOURCES_APPLICATION/application-object-application-flags)" }, "tags": { "type": "array", "description": "up to 5 tags describing the content and functionality of the application", "items": { "type": "string" } }, "install_params": { "$ref": "#/components/schemas/InstallParams", "description": "settings for the application's default in-app authorization link, if enabled" }, "custom_install_url": { "type": "string", "description": "the application's default custom authorization link, if enabled" }, "role_connections_verification_url": { "type": "string", "description": "the application's role connection verification entry point, which when configured will render the app as a verification method in the guild role verification configuration" } }, "required": [ "id", "name", "icon", "description", "bot_public", "bot_require_code_grant", "verify_key", "team" ] }, "ExampleApplication": { "type": "object", "properties": {} }, "InstallParams": { "type": "object", "properties": { "scopes": { "type": "array", "description": "the [scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) to add the application to the server with", "items": { "type": "string" } }, "permissions": { "type": "string", "description": "the [permissions](#DOCS_TOPICS_PERMISSIONS) to request for the bot role" } }, "required": [ "scopes", "permissions" ] }, "ApplicationRoleConnectionMetadata": { "type": "object", "properties": { "type": { "type": "object", "description": "type of metadata value" }, "key": { "type": "string", "description": "dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters)" }, "name": { "type": "string", "description": "name of the metadata field (1-100 characters)" }, "name_localizations": { "type": "object", "description": "translations of the name" }, "description": { "type": "string", "description": "description of the metadata field (1-200 characters)" }, "description_localizations": { "type": "object", "description": "translations of the description" } }, "required": [ "type", "key", "name", "description" ] }, "AuditLog": { "type": "object", "properties": { "application_commands": { "type": "array", "description": "List of application commands referenced in the audit log", "items": { "$ref": "#/components/schemas/ApplicationCommand" } }, "audit_log_entries": { "type": "array", "description": "List of audit log entries, sorted from most to least recent", "items": { "$ref": "#/components/schemas/AuditLogEntry" } }, "auto_moderation_rules": { "type": "array", "description": "List of auto moderation rules referenced in the audit log", "items": { "$ref": "#/components/schemas/AutoModerationRule" } }, "guild_scheduled_events": { "type": "array", "description": "List of guild scheduled events referenced in the audit log", "items": { "$ref": "#/components/schemas/GuildScheduledEvent" } }, "integrations": { "type": "array", "description": "List of partial integration objects", "items": { "$ref": "#/components/schemas/Integration" } }, "threads": { "type": "array", "description": "List of threads referenced in the audit log\\*", "items": { "$ref": "#/components/schemas/Channel" } }, "users": { "type": "array", "description": "List of users referenced in the audit log", "items": { "$ref": "#/components/schemas/User" } }, "webhooks": { "type": "array", "description": "List of webhooks referenced in the audit log", "items": { "$ref": "#/components/schemas/Webhook" } } }, "required": [ "application_commands", "audit_log_entries", "auto_moderation_rules", "guild_scheduled_events", "integrations", "threads", "users", "webhooks" ] }, "ExamplePartialIntegration": { "type": "object", "properties": {} }, "AuditLogEntry": { "type": "object", "properties": { "target_id": { "type": "string", "description": "ID of the affected entity (webhook, user, role, etc.)" }, "changes": { "type": "array", "description": "Changes made to the target_id", "items": { "$ref": "#/components/schemas/AuditLogChange" } }, "user_id": { "type": "string", "description": "User or app that made the changes" }, "id": { "type": "string", "description": "ID of the entry" }, "action_type": { "type": "object", "description": "Type of action that occurred" }, "options": { "type": "object", "description": "Additional info for certain event types" }, "reason": { "type": "string", "description": "Reason for the change (1-512 characters)" } }, "required": [ "target_id", "user_id", "id", "action_type" ] }, "AuditLogChange": { "type": "object", "properties": { "new_value": { "type": "object", "description": "New value of the key" }, "old_value": { "type": "object", "description": "Old value of the key" }, "key": { "type": "string", "description": "Name of the changed entity, with a few [exceptions](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object-audit-log-change-exceptions)" } }, "required": [ "key" ] }, "AutoModerationRule": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of this rule" }, "guild_id": { "type": "string", "description": "the id of the guild which this rule belongs to" }, "name": { "type": "string", "description": "the rule name" }, "creator_id": { "type": "string", "description": "the user which first created this rule" }, "event_type": { "type": "integer", "description": "the rule [event type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-event-types)" }, "trigger_type": { "type": "integer", "description": "the rule [trigger type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types)" }, "trigger_metadata": { "type": "object", "description": "the rule [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata)" }, "actions": { "type": "array", "description": "the actions which will execute when the rule is triggered", "items": { "$ref": "#/components/schemas/AutoModerationAction" } }, "enabled": { "type": "boolean", "description": "whether the rule is enabled" }, "exempt_roles": { "type": "array", "description": "the role ids that should not be affected by the rule (Maximum of 20)", "items": { "type": "string" } }, "exempt_channels": { "type": "array", "description": "the channel ids that should not be affected by the rule (Maximum of 50)", "items": { "type": "string" } } }, "required": [ "id", "guild_id", "name", "creator_id", "event_type", "trigger_type", "trigger_metadata", "actions", "enabled", "exempt_roles", "exempt_channels" ] }, "Trigger": { "type": "object", "properties": {} }, "KeywordPreset": { "type": "object", "properties": {} }, "Event": { "type": "object", "properties": {} }, "AutoModerationAction": { "type": "object", "properties": { "type": { "type": "object", "description": "the type of action" }, "metadata": { "type": "object", "description": "additional metadata needed during execution for this specific action type" } }, "required": [ "type" ] }, "Action": { "type": "object", "properties": {} }, "Channel": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of this channel" }, "type": { "type": "integer", "description": "the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types)" }, "guild_id": { "type": "string", "description": "the id of the guild (may be missing for some channel objects received over gateway guild dispatches)" }, "position": { "type": "integer", "description": "sorting position of the channel" }, "permission_overwrites": { "type": "array", "description": "explicit permission overwrites for members and roles", "items": { "$ref": "#/components/schemas/Overwrite" } }, "name": { "type": "string", "description": "the name of the channel (1-100 characters)" }, "topic": { "type": "string", "description": "the channel topic (0-4096 characters for `GUILD_FORUM` channels, 0-1024 characters for all others)" }, "nsfw": { "type": "boolean", "description": "whether the channel is nsfw" }, "last_message_id": { "type": "string", "description": "the id of the last message sent in this channel (or thread for `GUILD_FORUM` channels) (may not point to an existing or valid message or thread)" }, "bitrate": { "type": "integer", "description": "the bitrate (in bits) of the voice channel" }, "user_limit": { "type": "integer", "description": "the user limit of the voice channel" }, "rate_limit_per_user": { "type": "integer", "description": "amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected" }, "recipients": { "type": "array", "description": "the recipients of the DM", "items": { "$ref": "#/components/schemas/User" } }, "icon": { "type": "string", "description": "icon hash of the group DM" }, "owner_id": { "type": "string", "description": "id of the creator of the group DM or thread" }, "application_id": { "type": "string", "description": "application id of the group DM creator if it is bot-created" }, "managed": { "type": "boolean", "description": "for group DM channels: whether the channel is managed by an application via the `gdm.join` OAuth2 scope" }, "parent_id": { "type": "string", "description": "for guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created" }, "last_pin_timestamp": { "type": "string", "description": "when the last pinned message was pinned. This may be `null` in events such as `GUILD_CREATE` when a message is not pinned.", "format": "date-time" }, "rtc_region": { "type": "string", "description": "[voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id for the voice channel, automatic when set to null" }, "video_quality_mode": { "type": "integer", "description": "the camera [video quality mode](#DOCS_RESOURCES_CHANNEL/channel-object-video-quality-modes) of the voice channel, 1 when not present" }, "message_count": { "type": "integer", "description": "number of messages (not including the initial message or deleted messages) in a thread." }, "member_count": { "type": "integer", "description": "an approximate count of users in a thread, stops counting at 50" }, "thread_metadata": { "$ref": "#/components/schemas/ThreadMetadata", "description": "thread-specific fields not needed by other channels" }, "member": { "$ref": "#/components/schemas/ThreadMember", "description": "thread member object for the current user, if they have joined the thread, only included on certain API endpoints" }, "default_auto_archive_duration": { "type": "integer", "description": "default duration, copied onto newly created threads, in minutes, threads will stop showing in the channel list after the specified period of inactivity, can be set to: 60, 1440, 4320, 10080" }, "permissions": { "type": "string", "description": "computed permissions for the invoking user in the channel, including overwrites, only included when part of the `resolved` data received on a slash command interaction" }, "flags": { "type": "integer", "description": "[channel flags](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field)" }, "total_message_sent": { "type": "integer", "description": "number of messages ever sent in a thread, it's similar to `message_count` on message creation, but will not decrement the number when a message is deleted" }, "available_tags": { "type": "array", "description": "the set of tags that can be used in a `GUILD_FORUM` channel", "items": { "$ref": "#/components/schemas/ForumTag" } }, "applied_tags": { "type": "array", "description": "the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` channel", "items": { "type": "string" } }, "default_reaction_emoji": { "$ref": "#/components/schemas/DefaultReaction", "description": "the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` channel" }, "default_thread_rate_limit_per_user": { "type": "integer", "description": "the initial `rate_limit_per_user` to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update." }, "default_sort_order": { "type": "integer", "description": "the [default sort order type](#DOCS_RESOURCES_CHANNEL/channel-object-sort-order-types) used to order posts in `GUILD_FORUM` channels. Defaults to `null`, which indicates a preferred sort order hasn't been set by a channel admin" }, "default_forum_layout": { "type": "integer", "description": "the [default forum layout view](#DOCS_RESOURCES_CHANNEL/channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels. Defaults to `0`, which indicates a layout view has not been set by a channel admin" } }, "required": [ "id", "type" ] }, "SortOrder": { "type": "object", "properties": {} }, "ForumLayout": { "type": "object", "properties": {} }, "Message": { "type": "object", "properties": { "id": { "type": "string", "description": "id of the message" }, "channel_id": { "type": "string", "description": "id of the channel the message was sent in" }, "author": { "$ref": "#/components/schemas/User", "description": "the author of this message (not guaranteed to be a valid user, see below)" }, "content": { "type": "string", "description": "contents of the message" }, "timestamp": { "type": "string", "description": "when this message was sent", "format": "date-time" }, "edited_timestamp": { "type": "string", "description": "when this message was edited (or null if never)", "format": "date-time" }, "tts": { "type": "boolean", "description": "whether this was a TTS message" }, "mention_everyone": { "type": "boolean", "description": "whether this message mentions everyone" }, "mentions": { "type": "array", "description": "users specifically mentioned in the message", "items": { "$ref": "#/components/schemas/User" } }, "mention_roles": { "type": "array", "description": "roles specifically mentioned in this message", "items": { "$ref": "#/components/schemas/Role" } }, "mention_channels": { "type": "array", "description": "channels specifically mentioned in this message", "items": { "$ref": "#/components/schemas/ChannelMention" } }, "attachments": { "type": "array", "description": "any attached files", "items": { "$ref": "#/components/schemas/Attachment" } }, "embeds": { "type": "array", "description": "any embedded content", "items": { "$ref": "#/components/schemas/Embed" } }, "reactions": { "type": "array", "description": "reactions to the message", "items": { "$ref": "#/components/schemas/Reaction" } }, "nonce": { "type": "integer", "description": "used for validating a message was sent" }, "pinned": { "type": "boolean", "description": "whether this message is pinned" }, "webhook_id": { "type": "string", "description": "if the message is generated by a webhook, this is the webhook's id" }, "type": { "type": "integer", "description": "[type of message](#DOCS_RESOURCES_CHANNEL/message-object-message-types)" }, "activity": { "type": "object", "description": "sent with Rich Presence-related chat embeds" }, "application": { "$ref": "#/components/schemas/Application", "description": "sent with Rich Presence-related chat embeds" }, "application_id": { "type": "string", "description": "if the message is an [Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) or application-owned webhook, this is the id of the application" }, "message_reference": { "type": "object", "description": "data showing the source of a crosspost, channel follow add, pin, or reply message" }, "flags": { "type": "integer", "description": "[message flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field)" }, "referenced_message": { "$ref": "#/components/schemas/Message", "description": "the message associated with the message_reference" }, "interaction": { "type": "object", "description": "sent if the message is a response to an [Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/)" }, "thread": { "$ref": "#/components/schemas/Channel", "description": "the thread that was started from this message, includes [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object" }, "components": { "type": "array", "description": "sent if the message contains components like buttons, action rows, or other interactive components", "items": { "$ref": "#/components/schemas/Component" } }, "sticker_items": { "type": "array", "description": "sent if the message contains stickers", "items": { "$ref": "#/components/schemas/StickerItem" } }, "stickers": { "type": "array", "description": "**Deprecated** the stickers sent with the message", "items": { "$ref": "#/components/schemas/Sticker" } }, "position": { "type": "integer", "description": "A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread" }, "role_subscription_data": { "$ref": "#/components/schemas/RoleSubscriptionData", "description": "data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message" } }, "required": [ "id", "channel_id", "author", "content", "timestamp", "edited_timestamp", "tts", "mention_everyone", "mentions", "mention_roles", "attachments", "embeds", "pinned", "type" ] }, "MessageActivity": { "type": "object", "properties": { "type": { "type": "integer", "description": "[type of message activity](#DOCS_RESOURCES_CHANNEL/message-object-message-activity-types)" }, "party_id": { "type": "string", "description": "party_id from a [Rich Presence event](#DOCS_RICH_PRESENCE_HOW_TO/updating-presence-update-presence-payload-fields)" } }, "required": [ "type" ] }, "MessageReference": { "type": "object", "properties": { "message_id": { "type": "string", "description": "id of the originating message" }, "channel_id": { "type": "string", "description": "id of the originating message's channel" }, "guild_id": { "type": "string", "description": "id of the originating message's guild" }, "fail_if_not_exists": { "type": "boolean", "description": "when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true" } } }, "FollowedChannel": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "source channel id" }, "webhook_id": { "type": "string", "description": "created target webhook id" } }, "required": [ "channel_id", "webhook_id" ] }, "Reaction": { "type": "object", "properties": { "count": { "type": "integer", "description": "times this emoji has been used to react" }, "me": { "type": "boolean", "description": "whether the current user reacted using this emoji" }, "emoji": { "$ref": "#/components/schemas/Emoji", "description": "emoji information" } }, "required": [ "count", "me", "emoji" ] }, "Overwrite": { "type": "object", "properties": { "id": { "type": "string", "description": "role or user id" }, "type": { "type": "integer", "description": "either 0 (role) or 1 (member)" }, "allow": { "type": "string", "description": "permission bit set" }, "deny": { "type": "string", "description": "permission bit set" } }, "required": [ "id", "type", "allow", "deny" ] }, "ThreadMetadata": { "type": "object", "properties": { "archived": { "type": "boolean", "description": "whether the thread is archived" }, "auto_archive_duration": { "type": "integer", "description": "the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080" }, "archive_timestamp": { "type": "string", "description": "timestamp when the thread's archive status was last changed, used for calculating recent activity", "format": "date-time" }, "locked": { "type": "boolean", "description": "whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it" }, "invitable": { "type": "boolean", "description": "whether non-moderators can add other non-moderators to a thread; only available on private threads" }, "create_timestamp": { "type": "string", "description": "timestamp when the thread was created; only populated for threads created after 2022-01-09", "format": "date-time" } }, "required": [ "archived", "auto_archive_duration", "archive_timestamp", "locked" ] }, "ThreadMember": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the thread" }, "user_id": { "type": "string", "description": "ID of the user" }, "join_timestamp": { "type": "string", "description": "Time the user last joined the thread", "format": "date-time" }, "flags": { "type": "integer", "description": "Any user-thread settings, currently only used for notifications" }, "member": { "$ref": "#/components/schemas/GuildMember", "description": "Additional information about the user" } }, "required": [ "join_timestamp", "flags" ] }, "DefaultReaction": { "type": "object", "properties": { "emoji_id": { "type": "string", "description": "the id of a guild's custom emoji" }, "emoji_name": { "type": "string", "description": "the unicode character of the emoji" } }, "required": [ "emoji_id", "emoji_name" ] }, "ForumTag": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of the tag" }, "name": { "type": "string", "description": "the name of the tag (0-20 characters)" }, "moderated": { "type": "boolean", "description": "whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission" }, "emoji_id": { "type": "string", "description": "the id of a guild's custom emoji \\*" }, "emoji_name": { "type": "string", "description": "the unicode character of the emoji \\*" } }, "required": [ "id", "name", "moderated", "emoji_id", "emoji_name" ] }, "Embed": { "type": "object", "properties": { "title": { "type": "string", "description": "title of embed" }, "type": { "type": "string", "description": "[type of embed](#DOCS_RESOURCES_CHANNEL/embed-object-embed-types) (always \"rich\" for webhook embeds)" }, "description": { "type": "string", "description": "description of embed" }, "url": { "type": "string", "description": "url of embed" }, "timestamp": { "type": "string", "description": "timestamp of embed content", "format": "date-time" }, "color": { "type": "integer", "description": "color code of the embed" }, "footer": { "type": "object", "description": "footer information" }, "image": { "type": "object", "description": "image information" }, "thumbnail": { "type": "object", "description": "thumbnail information" }, "video": { "type": "object", "description": "video information" }, "provider": { "type": "object", "description": "provider information" }, "author": { "type": "object", "description": "author information" }, "fields": { "type": "array", "description": "fields information", "items": { "type": "object" } } } }, "EmbedThumbnail": { "type": "object", "properties": { "url": { "type": "string", "description": "source url of thumbnail (only supports http(s) and attachments)" }, "proxy_url": { "type": "string", "description": "a proxied url of the thumbnail" }, "height": { "type": "integer", "description": "height of thumbnail" }, "width": { "type": "integer", "description": "width of thumbnail" } }, "required": [ "url" ] }, "EmbedVideo": { "type": "object", "properties": { "url": { "type": "string", "description": "source url of video" }, "proxy_url": { "type": "string", "description": "a proxied url of the video" }, "height": { "type": "integer", "description": "height of video" }, "width": { "type": "integer", "description": "width of video" } } }, "EmbedImage": { "type": "object", "properties": { "url": { "type": "string", "description": "source url of image (only supports http(s) and attachments)" }, "proxy_url": { "type": "string", "description": "a proxied url of the image" }, "height": { "type": "integer", "description": "height of image" }, "width": { "type": "integer", "description": "width of image" } }, "required": [ "url" ] }, "EmbedProvider": { "type": "object", "properties": { "name": { "type": "string", "description": "name of provider" }, "url": { "type": "string", "description": "url of provider" } } }, "EmbedAuthor": { "type": "object", "properties": { "name": { "type": "string", "description": "name of author" }, "url": { "type": "string", "description": "url of author (only supports http(s))" }, "icon_url": { "type": "string", "description": "url of author icon (only supports http(s) and attachments)" }, "proxy_icon_url": { "type": "string", "description": "a proxied url of author icon" } }, "required": [ "name" ] }, "EmbedFooter": { "type": "object", "properties": { "text": { "type": "string", "description": "footer text" }, "icon_url": { "type": "string", "description": "url of footer icon (only supports http(s) and attachments)" }, "proxy_icon_url": { "type": "string", "description": "a proxied url of footer icon" } }, "required": [ "text" ] }, "EmbedField": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the field" }, "value": { "type": "string", "description": "value of the field" }, "inline": { "type": "boolean", "description": "whether or not this field should display inline" } }, "required": [ "name", "value" ] }, "Attachment": { "type": "object", "properties": { "id": { "type": "string", "description": "attachment id" }, "filename": { "type": "string", "description": "name of file attached" }, "description": { "type": "string", "description": "description for the file (max 1024 characters)" }, "content_type": { "type": "string", "description": "the attachment's [media type](https://en.wikipedia.org/wiki/Media_type)" }, "size": { "type": "integer", "description": "size of file in bytes" }, "url": { "type": "string", "description": "source url of file" }, "proxy_url": { "type": "string", "description": "a proxied url of file" }, "height": { "type": "integer", "description": "height of file (if image)" }, "width": { "type": "integer", "description": "width of file (if image)" }, "ephemeral": { "type": "boolean", "description": "whether this attachment is ephemeral" }, "duration_secs": { "type": "number", "description": "the duration of the audio file (currently for voice messages)" }, "waveform": { "type": "string", "description": "base64 encoded bytearray representing a sampled waveform (currently for voice messages)" } }, "required": [ "id", "filename", "size", "url", "proxy_url" ] }, "ChannelMention": { "type": "object", "properties": { "id": { "type": "string", "description": "id of the channel" }, "guild_id": { "type": "string", "description": "id of the guild containing the channel" }, "type": { "type": "integer", "description": "the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types)" }, "name": { "type": "string", "description": "the name of the channel" } }, "required": [ "id", "guild_id", "type", "name" ] }, "AllowedMention": { "type": "object", "properties": {} }, "AllowedMentions": { "type": "object", "properties": { "parse": { "type": "array", "description": "An array of [allowed mention types](#DOCS_RESOURCES_CHANNEL/allowed-mentions-object-allowed-mention-types) to parse from the content.", "items": { "type": "string" } }, "roles": { "type": "array", "description": "Array of role_ids to mention (Max size of 100)", "items": { "type": "string" } }, "users": { "type": "array", "description": "Array of user_ids to mention (Max size of 100)", "items": { "type": "string" } }, "replied_user": { "type": "boolean", "description": "For replies, whether to mention the author of the message being replied to (default false)" } }, "required": [ "parse", "roles", "users", "replied_user" ] }, "RoleSubscriptionData": { "type": "object", "properties": { "role_subscription_listing_id": { "type": "string", "description": "the id of the sku and listing that the user is subscribed to" }, "tier_name": { "type": "string", "description": "the name of the tier that the user is subscribed to" }, "total_months_subscribed": { "type": "integer", "description": "the cumulative number of months that the user has been subscribed for" }, "is_renewal": { "type": "boolean", "description": "whether this notification is for a renewal rather than a new purchase" } }, "required": [ "role_subscription_listing_id", "tier_name", "total_months_subscribed", "is_renewal" ] }, "ForumThreadMessageParams": { "type": "object", "properties": { "content": { "type": "string", "description": "Message contents (up to 2000 characters)" }, "embeds": { "type": "array", "description": "Up to 10 `rich` embeds (up to 6000 characters)", "items": { "$ref": "#/components/schemas/Embed" } }, "allowed_mentions": { "$ref": "#/components/schemas/AllowedMentions", "description": "Allowed mentions for the message" }, "components": { "type": "array", "description": "Components to include with the message", "items": { "$ref": "#/components/schemas/Component" } }, "sticker_ids": { "type": "array", "description": "IDs of up to 3 [stickers](#DOCS_RESOURCES_STICKER/sticker-object) in the server to send in the message", "items": { "type": "string" } }, "payload_json": { "type": "string", "description": "JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](#DOCS_REFERENCE/uploading-files)" }, "attachments": { "type": "array", "description": "Attachment objects with `filename` and `description`. See [Uploading Files](#DOCS_REFERENCE/uploading-files)", "items": { "$ref": "#/components/schemas/Attachment" } }, "flags": { "type": "integer", "description": "[Message flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set)" } }, "required": [ "files" ] }, "Emoji": { "type": "object", "properties": { "id": { "type": "string", "description": "[emoji id](#DOCS_REFERENCE/image-formatting)" }, "name": { "type": "string", "description": "emoji name" }, "roles": { "type": "array", "description": "roles allowed to use this emoji", "items": { "$ref": "#/components/schemas/Role" } }, "user": { "$ref": "#/components/schemas/User", "description": "user that created this emoji" }, "require_colons": { "type": "boolean", "description": "whether this emoji must be wrapped in colons" }, "managed": { "type": "boolean", "description": "whether this emoji is managed" }, "animated": { "type": "boolean", "description": "whether this emoji is animated" }, "available": { "type": "boolean", "description": "whether this emoji can be used, may be false due to loss of Server Boosts" } }, "required": [ "id", "name" ] }, "Guild": { "type": "object", "properties": { "id": { "type": "string", "description": "guild id" }, "name": { "type": "string", "description": "guild name (2-100 characters, excluding trailing and leading whitespace)" }, "icon": { "type": "string", "description": "[icon hash](#DOCS_REFERENCE/image-formatting)" }, "icon_hash": { "type": "string", "description": "[icon hash](#DOCS_REFERENCE/image-formatting), returned when in the template object" }, "splash": { "type": "string", "description": "[splash hash](#DOCS_REFERENCE/image-formatting)" }, "discovery_splash": { "type": "string", "description": "[discovery splash hash](#DOCS_REFERENCE/image-formatting); only present for guilds with the \"DISCOVERABLE\" feature" }, "owner": { "type": "boolean", "description": "true if [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) is the owner of the guild" }, "owner_id": { "type": "string", "description": "id of owner" }, "permissions": { "type": "string", "description": "total permissions for [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) in the guild (excludes overwrites)" }, "region": { "type": "string", "description": "[voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id for the guild (deprecated)" }, "afk_channel_id": { "type": "string", "description": "id of afk channel" }, "afk_timeout": { "type": "integer", "description": "afk timeout in seconds" }, "widget_enabled": { "type": "boolean", "description": "true if the server widget is enabled" }, "widget_channel_id": { "type": "string", "description": "the channel id that the widget will generate an invite to, or `null` if set to no invite" }, "verification_level": { "type": "integer", "description": "[verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level) required for the guild" }, "default_message_notifications": { "type": "integer", "description": "default [message notifications level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level)" }, "explicit_content_filter": { "type": "integer", "description": "[explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level)" }, "roles": { "type": "array", "description": "roles in the guild", "items": { "$ref": "#/components/schemas/Role" } }, "emojis": { "type": "array", "description": "custom guild emojis", "items": { "$ref": "#/components/schemas/Emoji" } }, "features": { "type": "array", "description": "enabled guild features", "items": { "type": "object" } }, "mfa_level": { "type": "integer", "description": "required [MFA level](#DOCS_RESOURCES_GUILD/guild-object-mfa-level) for the guild" }, "application_id": { "type": "string", "description": "application id of the guild creator if it is bot-created" }, "system_channel_id": { "type": "string", "description": "the id of the channel where guild notices such as welcome messages and boost events are posted" }, "system_channel_flags": { "type": "integer", "description": "[system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags)" }, "rules_channel_id": { "type": "string", "description": "the id of the channel where Community guilds can display rules and/or guidelines" }, "max_presences": { "type": "integer", "description": "the maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds)" }, "max_members": { "type": "integer", "description": "the maximum number of members for the guild" }, "vanity_url_code": { "type": "string", "description": "the vanity url code for the guild" }, "description": { "type": "string", "description": "the description of a guild" }, "banner": { "type": "string", "description": "[banner hash](#DOCS_REFERENCE/image-formatting)" }, "premium_tier": { "type": "integer", "description": "[premium tier](#DOCS_RESOURCES_GUILD/guild-object-premium-tier) (Server Boost level)" }, "premium_subscription_count": { "type": "integer", "description": "the number of boosts this guild currently has" }, "preferred_locale": { "type": "string", "description": "the preferred [locale](#DOCS_REFERENCE/locales) of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to \"en-US\"" }, "public_updates_channel_id": { "type": "string", "description": "the id of the channel where admins and moderators of Community guilds receive notices from Discord" }, "max_video_channel_users": { "type": "integer", "description": "the maximum amount of users in a video channel" }, "max_stage_video_channel_users": { "type": "integer", "description": "the maximum amount of users in a stage video channel" }, "approximate_member_count": { "type": "integer", "description": "approximate number of members in this guild, returned from the `GET /guilds/` endpoint when `with_counts` is `true`" }, "approximate_presence_count": { "type": "integer", "description": "approximate number of non-offline members in this guild, returned from the `GET /guilds/` endpoint when `with_counts` is `true`" }, "welcome_screen": { "$ref": "#/components/schemas/WelcomeScreen", "description": "the welcome screen of a Community guild, shown to new members, returned in an [Invite](#DOCS_RESOURCES_INVITE/invite-object)'s guild object" }, "nsfw_level": { "type": "integer", "description": "[guild NSFW level](#DOCS_RESOURCES_GUILD/guild-object-guild-nsfw-level)" }, "stickers": { "type": "array", "description": "custom guild stickers", "items": { "$ref": "#/components/schemas/Sticker" } }, "premium_progress_bar_enabled": { "type": "boolean", "description": "whether the guild has the boost progress bar enabled" }, "safety_alerts_channel_id": { "type": "string", "description": "the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord" } }, "required": [ "id", "name", "icon", "splash", "discovery_splash", "owner_id", "afk_channel_id", "afk_timeout", "verification_level", "default_message_notifications", "explicit_content_filter", "roles", "emojis", "features", "mfa_level", "application_id", "system_channel_id", "system_channel_flags", "rules_channel_id", "vanity_url_code", "description", "banner", "premium_tier", "preferred_locale", "public_updates_channel_id", "nsfw_level", "premium_progress_bar_enabled", "safety_alerts_channel_id" ] }, "GuildPreview": { "type": "object", "properties": { "id": { "type": "string", "description": "guild id" }, "name": { "type": "string", "description": "guild name (2-100 characters)" }, "icon": { "type": "string", "description": "[icon hash](#DOCS_REFERENCE/image-formatting)" }, "splash": { "type": "string", "description": "[splash hash](#DOCS_REFERENCE/image-formatting)" }, "discovery_splash": { "type": "string", "description": "[discovery splash hash](#DOCS_REFERENCE/image-formatting)" }, "emojis": { "type": "array", "description": "custom guild emojis", "items": { "$ref": "#/components/schemas/Emoji" } }, "features": { "type": "array", "description": "enabled guild features", "items": { "type": "object" } }, "approximate_member_count": { "type": "integer", "description": "approximate number of members in this guild" }, "approximate_presence_count": { "type": "integer", "description": "approximate number of online members in this guild" }, "description": { "type": "string", "description": "the description for the guild" }, "stickers": { "type": "array", "description": "custom guild stickers", "items": { "$ref": "#/components/schemas/Sticker" } } }, "required": [ "id", "name", "icon", "splash", "discovery_splash", "emojis", "features", "approximate_member_count", "approximate_presence_count", "description", "stickers" ] }, "GuildWidgetSettings": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "whether the widget is enabled" }, "channel_id": { "type": "string", "description": "the widget channel id" } }, "required": [ "enabled", "channel_id" ] }, "GuildWidget": { "type": "object", "properties": { "id": { "type": "string", "description": "guild id" }, "name": { "type": "string", "description": "guild name (2-100 characters)" }, "instant_invite": { "type": "string", "description": "instant invite for the guilds specified widget invite channel" }, "channels": { "type": "array", "description": "voice and stage channels which are accessible by @everyone", "items": { "$ref": "#/components/schemas/Channel" } }, "members": { "type": "array", "description": "special widget user objects that includes users presence (Limit 100)", "items": { "$ref": "#/components/schemas/User" } }, "presence_count": { "type": "integer", "description": "number of online members in this guild" } }, "required": [ "id", "name", "instant_invite", "channels", "members", "presence_count" ] }, "GuildMember": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User", "description": "the user this guild member represents" }, "nick": { "type": "string", "description": "this user's guild nickname" }, "avatar": { "type": "string", "description": "the member's [guild avatar hash](#DOCS_REFERENCE/image-formatting)" }, "roles": { "type": "array", "description": "array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids", "items": { "type": "string" } }, "joined_at": { "type": "string", "description": "when the user joined the guild", "format": "date-time" }, "premium_since": { "type": "string", "description": "when the user started [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild", "format": "date-time" }, "deaf": { "type": "boolean", "description": "whether the user is deafened in voice channels" }, "mute": { "type": "boolean", "description": "whether the user is muted in voice channels" }, "flags": { "type": "integer", "description": "[guild member flags](#DOCS_RESOURCES_GUILD/guild-member-object-guild-member-flags) represented as a bit set, defaults to `0`" }, "pending": { "type": "boolean", "description": "whether the user has not yet passed the guild's [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) requirements" }, "permissions": { "type": "string", "description": "total permissions of the member in the channel, including overwrites, returned when in the interaction object" }, "communication_disabled_until": { "type": "string", "description": "when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out", "format": "date-time" } }, "required": [ "roles", "joined_at", "deaf", "mute", "flags" ] }, "Integration": { "type": "object", "properties": { "id": { "type": "string", "description": "integration id" }, "name": { "type": "string", "description": "integration name" }, "type": { "type": "string", "description": "integration type (twitch, youtube, discord, or guild_subscription)" }, "enabled": { "type": "boolean", "description": "is this integration enabled" }, "syncing": { "type": "boolean", "description": "is this integration syncing" }, "role_id": { "type": "string", "description": "id that this integration uses for \"subscribers\"" }, "enable_emoticons": { "type": "boolean", "description": "whether emoticons should be synced for this integration (twitch only currently)" }, "expire_behavior": { "type": "object", "description": "the behavior of expiring subscribers" }, "expire_grace_period": { "type": "integer", "description": "the grace period (in days) before expiring subscribers" }, "user": { "$ref": "#/components/schemas/User", "description": "user for this integration" }, "account": { "$ref": "#/components/schemas/IntegrationAccount", "description": "integration account information" }, "synced_at": { "type": "string", "description": "when this integration was last synced", "format": "date-time" }, "subscriber_count": { "type": "integer", "description": "how many subscribers this integration has" }, "revoked": { "type": "boolean", "description": "has this integration been revoked" }, "application": { "$ref": "#/components/schemas/IntegrationApplication", "description": "The bot/OAuth2 application for discord integrations" }, "scopes": { "type": "array", "description": "the scopes the application has been authorized for", "items": { "type": "object" } } }, "required": [ "id", "name", "type", "enabled", "account" ] }, "IntegrationAccount": { "type": "object", "properties": { "id": { "type": "string", "description": "id of the account" }, "name": { "type": "string", "description": "name of the account" } }, "required": [ "id", "name" ] }, "IntegrationApplication": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of the app" }, "name": { "type": "string", "description": "the name of the app" }, "icon": { "type": "string", "description": "the [icon hash](#DOCS_REFERENCE/image-formatting) of the app" }, "description": { "type": "string", "description": "the description of the app" }, "bot": { "$ref": "#/components/schemas/User", "description": "the bot associated with this application" } }, "required": [ "id", "name", "icon", "description" ] }, "Ban": { "type": "object", "properties": { "reason": { "type": "string", "description": "the reason for the ban" }, "user": { "$ref": "#/components/schemas/User", "description": "the banned user" } }, "required": [ "reason", "user" ] }, "WelcomeScreen": { "type": "object", "properties": { "description": { "type": "string", "description": "the server description shown in the welcome screen" }, "welcome_channels": { "type": "array", "description": "the channels shown in the welcome screen, up to 5", "items": { "type": "object" } } }, "required": [ "description", "welcome_channels" ] }, "WelcomeScreenChannel": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "the channel's id" }, "description": { "type": "string", "description": "the description shown for the channel" }, "emoji_id": { "type": "string", "description": "the [emoji id](#DOCS_REFERENCE/image-formatting), if the emoji is custom" }, "emoji_name": { "type": "string", "description": "the emoji name if custom, the unicode character if standard, or `null` if no emoji is set" } }, "required": [ "channel_id", "description", "emoji_id", "emoji_name" ] }, "GuildOnboarding": { "type": "object", "properties": { "guild_id": { "type": "string", "description": "ID of the guild this onboarding is part of" }, "prompts": { "type": "array", "description": "Prompts shown during onboarding and in customize community", "items": { "type": "object" } }, "default_channel_ids": { "type": "array", "description": "Channel IDs that members get opted into automatically", "items": { "type": "string" } }, "enabled": { "type": "boolean", "description": "Whether onboarding is enabled in the guild" } }, "required": [ "guild_id", "prompts", "default_channel_ids", "enabled" ] }, "OnboardingPrompt": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the prompt" }, "type": { "type": "object", "description": "Type of prompt" }, "options": { "type": "array", "description": "Options available within the prompt", "items": { "type": "object" } }, "title": { "type": "string", "description": "Title of the prompt" }, "single_select": { "type": "boolean", "description": "Indicates whether users are limited to selecting one option for the prompt" }, "required": { "type": "boolean", "description": "Indicates whether the prompt is required before a user completes the onboarding flow" }, "in_onboarding": { "type": "boolean", "description": "Indicates whether the prompt is present in the onboarding flow. If `false`, the prompt will only appear in the Channels & Roles tab" } }, "required": [ "id", "type", "options", "title", "single_select", "required", "in_onboarding" ] }, "PromptOption": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the prompt option" }, "channel_ids": { "type": "array", "description": "IDs for channels a member is added to when the option is selected", "items": { "type": "string" } }, "role_ids": { "type": "array", "description": "IDs for roles assigned to a member when the option is selected", "items": { "type": "string" } }, "emoji": { "$ref": "#/components/schemas/Emoji", "description": "Emoji of the option" }, "title": { "type": "string", "description": "Title of the option" }, "description": { "type": "string", "description": "Description of the option" } }, "required": [ "id", "channel_ids", "role_ids", "emoji", "title", "description" ] }, "Prompt": { "type": "object", "properties": {} }, "ExamplePartialChannel": { "type": "object", "properties": {} }, "ExamplePartialInvite": { "type": "object", "properties": {} }, "GuildScheduledEvent": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of the scheduled event" }, "guild_id": { "type": "string", "description": "the guild id which the scheduled event belongs to" }, "channel_id": { "type": "string", "description": "the channel id in which the scheduled event will be hosted, or `null` if [scheduled entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) is `EXTERNAL`" }, "creator_id": { "type": "string", "description": "the id of the user that created the scheduled event *" }, "name": { "type": "string", "description": "the name of the scheduled event (1-100 characters)" }, "description": { "type": "string", "description": "the description of the scheduled event (1-1000 characters)" }, "scheduled_start_time": { "type": "string", "description": "the time the scheduled event will start", "format": "date-time" }, "scheduled_end_time": { "type": "string", "description": "the time the scheduled event will end, required if entity_type is `EXTERNAL`", "format": "date-time" }, "privacy_level": { "type": "object", "description": "the privacy level of the scheduled event" }, "status": { "type": "object", "description": "the status of the scheduled event" }, "entity_type": { "type": "object", "description": "the type of the scheduled event" }, "entity_id": { "type": "string", "description": "the id of an entity associated with a guild scheduled event" }, "entity_metadata": { "type": "object", "description": "additional metadata for the guild scheduled event" }, "creator": { "$ref": "#/components/schemas/User", "description": "the user that created the scheduled event" }, "user_count": { "type": "integer", "description": "the number of users subscribed to the scheduled event" }, "image": { "type": "string", "description": "the [cover image hash](#DOCS_REFERENCE/image-formatting) of the scheduled event" } }, "required": [ "id", "guild_id", "channel_id", "name", "scheduled_start_time", "scheduled_end_time", "privacy_level", "status", "entity_type", "entity_id", "entity_metadata" ] }, "GuildScheduledEventEntity": { "type": "object", "properties": {} }, "GuildScheduledEventUser": { "type": "object", "properties": { "guild_scheduled_event_id": { "type": "string", "description": "the scheduled event id which the user subscribed to" }, "user": { "$ref": "#/components/schemas/User", "description": "user which subscribed to an event" }, "member": { "$ref": "#/components/schemas/GuildMember", "description": "guild member data for this user for the guild which this event belongs to, if any" } }, "required": [ "guild_scheduled_event_id", "user" ] }, "GuildTemplate": { "type": "object", "properties": { "code": { "type": "string", "description": "the template code (unique ID)" }, "name": { "type": "string", "description": "template name" }, "description": { "type": "string", "description": "the description for the template" }, "usage_count": { "type": "integer", "description": "number of times this template has been used" }, "creator_id": { "type": "string", "description": "the ID of the user who created the template" }, "creator": { "$ref": "#/components/schemas/User", "description": "the user who created the template" }, "created_at": { "type": "string", "description": "when this template was created", "format": "date-time" }, "updated_at": { "type": "string", "description": "when this template was last synced to the source guild", "format": "date-time" }, "source_guild_id": { "type": "string", "description": "the ID of the guild this template is based on" }, "serialized_source_guild": { "$ref": "#/components/schemas/Guild", "description": "the guild snapshot this template contains" }, "is_dirty": { "type": "boolean", "description": "whether the template has unsynced changes" } }, "required": [ "code", "name", "description", "usage_count", "creator_id", "creator", "created_at", "updated_at", "source_guild_id", "serialized_source_guild", "is_dirty" ] }, "ExampleGuildTemplate": { "type": "object", "properties": {} }, "Invite": { "type": "object", "properties": { "code": { "type": "string", "description": "the invite code (unique ID)" }, "guild": { "$ref": "#/components/schemas/Guild", "description": "the guild this invite is for" }, "channel": { "$ref": "#/components/schemas/Channel", "description": "the channel this invite is for" }, "inviter": { "$ref": "#/components/schemas/User", "description": "the user who created the invite" }, "target_type": { "type": "integer", "description": "the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite" }, "target_user": { "$ref": "#/components/schemas/User", "description": "the user whose stream to display for this voice channel stream invite" }, "target_application": { "$ref": "#/components/schemas/Application", "description": "the embedded application to open for this voice channel embedded application invite" }, "approximate_presence_count": { "type": "integer", "description": "approximate count of online members, returned from the `GET /invites/` endpoint when `with_counts` is `true`" }, "approximate_member_count": { "type": "integer", "description": "approximate count of total members, returned from the `GET /invites/` endpoint when `with_counts` is `true`" }, "expires_at": { "type": "string", "description": "the expiration date of this invite, returned from the `GET /invites/` endpoint when `with_expiration` is `true`", "format": "date-time" }, "stage_instance": { "$ref": "#/components/schemas/InviteStageInstance", "description": "stage instance data if there is a [public Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE) in the Stage channel this invite is for (deprecated)" }, "guild_scheduled_event": { "$ref": "#/components/schemas/GuildScheduledEvent", "description": "guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id" } }, "required": [ "code", "channel" ] }, "InviteTarget": { "type": "object", "properties": {} }, "ExampleInvite": { "type": "object", "properties": {} }, "InviteMetadata": { "type": "object", "properties": { "uses": { "type": "integer", "description": "number of times this invite has been used" }, "max_uses": { "type": "integer", "description": "max number of times this invite can be used" }, "max_age": { "type": "integer", "description": "duration (in seconds) after which the invite expires" }, "temporary": { "type": "boolean", "description": "whether this invite only grants temporary membership" }, "created_at": { "type": "string", "description": "when this invite was created", "format": "date-time" } }, "required": [ "uses", "max_uses", "max_age", "temporary", "created_at" ] }, "InviteStageInstance": { "type": "object", "properties": { "members": { "type": "array", "description": "the members speaking in the Stage", "items": { "$ref": "#/components/schemas/GuildMember" } }, "participant_count": { "type": "integer", "description": "the number of users in the Stage" }, "speaker_count": { "type": "integer", "description": "the number of users speaking in the Stage" }, "topic": { "type": "string", "description": "the topic of the Stage instance (1-120 characters)" } }, "required": [ "members", "participant_count", "speaker_count", "topic" ] }, "StageInstance": { "type": "object", "properties": { "id": { "type": "string", "description": "The id of this Stage instance" }, "guild_id": { "type": "string", "description": "The guild id of the associated Stage channel" }, "channel_id": { "type": "string", "description": "The id of the associated Stage channel" }, "topic": { "type": "string", "description": "The topic of the Stage instance (1-120 characters)" }, "privacy_level": { "type": "integer", "description": "The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance" }, "discoverable_disabled": { "type": "boolean", "description": "Whether or not Stage Discovery is disabled (deprecated)" }, "guild_scheduled_event_id": { "type": "string", "description": "The id of the scheduled event for this Stage instance" } }, "required": [ "id", "guild_id", "channel_id", "topic", "privacy_level", "discoverable_disabled", "guild_scheduled_event_id" ] }, "Sticker": { "type": "object", "properties": { "id": { "type": "string", "description": "[id of the sticker](#DOCS_REFERENCE/image-formatting)" }, "pack_id": { "type": "string", "description": "for standard stickers, id of the pack the sticker is from" }, "name": { "type": "string", "description": "name of the sticker" }, "description": { "type": "string", "description": "description of the sticker" }, "tags": { "type": "string", "description": "autocomplete/suggestion tags for the sticker (max 200 characters)" }, "asset": { "type": "string", "description": "**Deprecated** previously the sticker asset hash, now an empty string" }, "type": { "type": "integer", "description": "[type of sticker](#DOCS_RESOURCES_STICKER/sticker-object-sticker-types)" }, "format_type": { "type": "integer", "description": "[type of sticker format](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types)" }, "available": { "type": "boolean", "description": "whether this guild sticker can be used, may be false due to loss of Server Boosts" }, "guild_id": { "type": "string", "description": "id of the guild that owns this sticker" }, "user": { "$ref": "#/components/schemas/User", "description": "the user that uploaded the guild sticker" }, "sort_value": { "type": "integer", "description": "the standard sticker's sort order within its pack" } }, "required": [ "id", "name", "description", "tags", "type", "format_type" ] }, "StickerFormat": { "type": "object", "properties": {} }, "StickerItem": { "type": "object", "properties": { "id": { "type": "string", "description": "id of the sticker" }, "name": { "type": "string", "description": "name of the sticker" }, "format_type": { "type": "integer", "description": "[type of sticker format](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types)" } }, "required": [ "id", "name", "format_type" ] }, "StickerPack": { "type": "object", "properties": { "id": { "type": "string", "description": "id of the sticker pack" }, "stickers": { "type": "array", "description": "the stickers in the pack", "items": { "$ref": "#/components/schemas/Sticker" } }, "name": { "type": "string", "description": "name of the sticker pack" }, "sku_id": { "type": "string", "description": "id of the pack's SKU" }, "cover_sticker_id": { "type": "string", "description": "id of a sticker in the pack which is shown as the pack's icon" }, "description": { "type": "string", "description": "description of the sticker pack" }, "banner_asset_id": { "type": "string", "description": "id of the sticker pack's [banner image](#DOCS_REFERENCE/image-formatting)" } }, "required": [ "id", "stickers", "name", "sku_id", "description" ] }, "Response": { "type": "object", "properties": { "sticker_packs": { "type": "array", "items": { "$ref": "#/components/schemas/StickerPack" } } }, "required": [ "sticker_packs" ] }, "User": { "type": "object", "properties": { "id": { "type": "string", "description": "the user's id" }, "username": { "type": "string", "description": "the user's username, not unique across the platform" }, "discriminator": { "type": "string", "description": "the user's 4-digit discord-tag" }, "avatar": { "type": "string", "description": "the user's [avatar hash](#DOCS_REFERENCE/image-formatting)" }, "bot": { "type": "boolean", "description": "whether the user belongs to an OAuth2 application" }, "system": { "type": "boolean", "description": "whether the user is an Official Discord System user (part of the urgent message system)" }, "mfa_enabled": { "type": "boolean", "description": "whether the user has two factor enabled on their account" }, "banner": { "type": "string", "description": "the user's [banner hash](#DOCS_REFERENCE/image-formatting)" }, "accent_color": { "type": "integer", "description": "the user's banner color encoded as an integer representation of hexadecimal color code" }, "locale": { "type": "string", "description": "the user's chosen [language option](#DOCS_REFERENCE/locales)" }, "verified": { "type": "boolean", "description": "whether the email on this account has been verified" }, "email": { "type": "string", "description": "the user's email" }, "flags": { "type": "integer", "description": "the [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account" }, "premium_type": { "type": "integer", "description": "the [type of Nitro subscription](#DOCS_RESOURCES_USER/user-object-premium-types) on a user's account" }, "public_flags": { "type": "integer", "description": "the public [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account" } }, "required": [ "id", "username", "discriminator", "avatar" ] }, "Premium": { "type": "object", "properties": {} }, "Connection": { "type": "object", "properties": { "id": { "type": "string", "description": "id of the connection account" }, "name": { "type": "string", "description": "the username of the connection account" }, "type": { "type": "string", "description": "the [service](#DOCS_RESOURCES_USER/connection-object-services) of this connection" }, "revoked": { "type": "boolean", "description": "whether the connection is revoked" }, "integrations": { "type": "array", "description": "an array of partial [server integrations](#DOCS_RESOURCES_GUILD/integration-object)", "items": { "$ref": "#/components/schemas/Integration" } }, "verified": { "type": "boolean", "description": "whether the connection is verified" }, "friend_sync": { "type": "boolean", "description": "whether friend sync is enabled for this connection" }, "show_activity": { "type": "boolean", "description": "whether activities related to this connection will be shown in presence updates" }, "two_way_link": { "type": "boolean", "description": "whether this connection has a corresponding third party OAuth2 token" }, "visibility": { "type": "integer", "description": "[visibility](#DOCS_RESOURCES_USER/connection-object-visibility-types) of this connection" } }, "required": [ "id", "name", "type", "verified", "friend_sync", "show_activity", "two_way_link", "visibility" ] }, "Visibility": { "type": "object", "properties": {} }, "ApplicationRoleConnection": { "type": "object", "properties": { "platform_name": { "type": "string", "description": "the vanity name of the platform a bot has connected (max 50 characters)" }, "platform_username": { "type": "string", "description": "the username on the platform a bot has connected (max 100 characters)" }, "metadata": { "type": "object", "description": "object mapping [application role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected" } }, "required": [ "platform_name", "platform_username", "metadata" ] }, "VoiceState": { "type": "object", "properties": { "guild_id": { "type": "string", "description": "the guild id this voice state is for" }, "channel_id": { "type": "string", "description": "the channel id this user is connected to" }, "user_id": { "type": "string", "description": "the user id this voice state is for" }, "member": { "$ref": "#/components/schemas/GuildMember", "description": "the guild member this voice state is for" }, "session_id": { "type": "string", "description": "the session id for this voice state" }, "deaf": { "type": "boolean", "description": "whether this user is deafened by the server" }, "mute": { "type": "boolean", "description": "whether this user is muted by the server" }, "self_deaf": { "type": "boolean", "description": "whether this user is locally deafened" }, "self_mute": { "type": "boolean", "description": "whether this user is locally muted" }, "self_stream": { "type": "boolean", "description": "whether this user is streaming using \"Go Live\"" }, "self_video": { "type": "boolean", "description": "whether this user's camera is enabled" }, "suppress": { "type": "boolean", "description": "whether this user's permission to speak is denied" }, "request_to_speak_timestamp": { "type": "string", "description": "the time at which the user requested to speak", "format": "date-time" } }, "required": [ "channel_id", "user_id", "session_id", "deaf", "mute", "self_deaf", "self_mute", "self_video", "suppress", "request_to_speak_timestamp" ] }, "VoiceRegion": { "type": "object", "properties": { "id": { "type": "string", "description": "unique ID for the region" }, "name": { "type": "string", "description": "name of the region" }, "optimal": { "type": "boolean", "description": "true for a single server that is closest to the current user's client" }, "custom": { "type": "boolean", "description": "whether this is a custom voice region (used for events/etc)" } }, "required": [ "id", "name", "optimal", "custom" ] }, "Webhook": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of the webhook" }, "type": { "type": "integer", "description": "the [type](#DOCS_RESOURCES_WEBHOOK/webhook-object-webhook-types) of the webhook" }, "guild_id": { "type": "string", "description": "the guild id this webhook is for, if any" }, "channel_id": { "type": "string", "description": "the channel id this webhook is for, if any" }, "user": { "$ref": "#/components/schemas/User", "description": "the user this webhook was created by (not returned when getting a webhook with its token)" }, "name": { "type": "string", "description": "the default name of the webhook" }, "avatar": { "type": "string", "description": "the default user avatar [hash](#DOCS_REFERENCE/image-formatting) of the webhook" }, "token": { "type": "string", "description": "the secure token of the webhook (returned for Incoming Webhooks)" }, "application_id": { "type": "string", "description": "the bot/OAuth2 application that created this webhook" }, "source_guild": { "$ref": "#/components/schemas/Guild", "description": "the guild of the channel that this webhook is following (returned for Channel Follower Webhooks)" }, "source_channel": { "$ref": "#/components/schemas/Channel", "description": "the channel that this webhook is following (returned for Channel Follower Webhooks)" }, "url": { "type": "string", "description": "the url used for executing the webhook (returned by the [webhooks](#DOCS_TOPICS_OAUTH2/webhooks) OAuth2 flow)" } }, "required": [ "id", "type", "channel_id", "name", "avatar", "application_id" ] }, "Device": { "type": "object", "properties": { "type": { "type": "object", "description": "the type of device" }, "id": { "type": "string", "description": "the device's Windows UUID" }, "vendor": { "$ref": "#/components/schemas/Vendor", "description": "the hardware vendor" }, "model": { "$ref": "#/components/schemas/Model", "description": "the model of the product" }, "related": { "type": "array", "description": "UUIDs of related devices", "items": { "type": "string" } }, "echo_cancellation": { "type": "boolean", "description": "if the device's native echo cancellation is enabled" }, "noise_suppression": { "type": "boolean", "description": "if the device's native noise suppression is enabled" }, "automatic_gain_control": { "type": "boolean", "description": "if the device's native automatic gain control is enabled" }, "hardware_mute": { "type": "boolean", "description": "if the device is hardware muted" } }, "required": [ "type", "id", "vendor", "model", "related" ] }, "Vendor": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the vendor" }, "url": { "type": "string", "description": "url for the vendor" } }, "required": [ "name", "url" ] }, "Model": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the model" }, "url": { "type": "string", "description": "url for the model" } }, "required": [ "name", "url" ] }, "SessionStartLimit": { "type": "object", "properties": { "total": { "type": "integer", "description": "Total number of session starts the current user is allowed" }, "remaining": { "type": "integer", "description": "Remaining number of session starts the current user is allowed" }, "reset_after": { "type": "integer", "description": "Number of milliseconds after which the limit resets" }, "max_concurrency": { "type": "integer", "description": "Number of identify requests allowed per 5 seconds" } }, "required": [ "total", "remaining", "reset_after", "max_concurrency" ] }, "Identify": { "type": "object", "properties": { "token": { "type": "string", "description": "Authentication token" }, "properties": { "type": "object", "description": "[Connection properties](#DOCS_TOPICS_GATEWAY_EVENTS/identify-identify-connection-properties)" }, "compress": { "type": "boolean", "description": "Whether this connection supports compression of packets" }, "large_threshold": { "type": "integer", "description": "Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list" }, "shard": { "type": "array", "description": "Used for [Guild Sharding](#DOCS_TOPICS_GATEWAY/sharding)", "items": { "type": "integer" } }, "presence": { "type": "object", "description": "Presence structure for initial presence information" }, "intents": { "type": "integer", "description": "[Gateway Intents](#DOCS_TOPICS_GATEWAY/gateway-intents) you wish to receive" } }, "required": [ "token", "properties", "intents" ] }, "Resume": { "type": "object", "properties": { "token": { "type": "string", "description": "Session token" }, "session_id": { "type": "string", "description": "Session ID" }, "seq": { "type": "integer", "description": "Last sequence number received" } }, "required": [ "token", "session_id", "seq" ] }, "RequestGuildMembers": { "type": "object", "properties": { "guild_id": { "type": "string", "description": "ID of the guild to get members for" }, "query": { "type": "string", "description": "string that username starts with, or an empty string to return all members" }, "limit": { "type": "integer", "description": "maximum number of members to send matching the `query`; a limit of `0` can be used with an empty string `query` to return all members" }, "presences": { "type": "boolean", "description": "used to specify if we want the presences of the matched members" }, "user_ids": { "type": "array", "description": "used to specify which users you wish to fetch", "items": { "type": "string" } }, "nonce": { "type": "string", "description": "nonce to identify the [Guild Members Chunk](#DOCS_TOPICS_GATEWAY_EVENTS/guild-members-chunk) response" } }, "required": [ "guild_id", "limit" ] }, "GatewayVoiceStateUpdate": { "type": "object", "properties": { "guild_id": { "type": "string", "description": "ID of the guild" }, "channel_id": { "type": "string", "description": "ID of the voice channel client wants to join (null if disconnecting)" }, "self_mute": { "type": "boolean", "description": "Whether the client is muted" }, "self_deaf": { "type": "boolean", "description": "Whether the client deafened" } }, "required": [ "guild_id", "channel_id", "self_mute", "self_deaf" ] }, "GatewayPresenceUpdate": { "type": "object", "properties": { "since": { "type": "integer", "description": "Unix time (in milliseconds) of when the client went idle, or null if the client is not idle" }, "activities": { "type": "array", "description": "User's activities", "items": { "$ref": "#/components/schemas/Activity" } }, "status": { "type": "string", "description": "User's new [status](#DOCS_TOPICS_GATEWAY_EVENTS/update-presence-status-types)" }, "afk": { "type": "boolean", "description": "Whether or not the client is afk" } }, "required": [ "since", "activities", "status", "afk" ] }, "Status": { "type": "object", "properties": {} }, "Hello": { "type": "object", "properties": { "heartbeat_interval": { "type": "integer", "description": "Interval (in milliseconds) an app should heartbeat with" } }, "required": [ "heartbeat_interval" ] }, "Activity": { "type": "object", "properties": { "name": { "type": "string", "description": "Activity's name" }, "type": { "type": "integer", "description": "[Activity type](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-types)" }, "url": { "type": "string", "description": "Stream URL, is validated when type is 1" }, "created_at": { "type": "integer", "description": "Unix timestamp (in milliseconds) of when the activity was added to the user's session" }, "timestamps": { "type": "object", "description": "Unix timestamps for start and/or end of the game" }, "application_id": { "type": "string", "description": "Application ID for the game" }, "details": { "type": "string", "description": "What the player is currently doing" }, "state": { "type": "string", "description": "User's current party status" }, "emoji": { "type": "object", "description": "Emoji used for a custom status" }, "party": { "type": "object", "description": "Information for the current party of the player" }, "assets": { "type": "object", "description": "Images for the presence and their hover texts" }, "secrets": { "type": "object", "description": "Secrets for Rich Presence joining and spectating" }, "instance": { "type": "boolean", "description": "Whether or not the activity is an instanced game session" }, "flags": { "type": "integer", "description": "[Activity flags](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-flags) `OR`d together, describes what the payload includes" }, "buttons": { "type": "array", "description": "Custom buttons shown in the Rich Presence (max 2)", "items": { "type": "object" } } }, "required": [ "name", "type", "created_at" ] }, "Role": { "type": "object", "properties": { "id": { "type": "string", "description": "role id" }, "name": { "type": "string", "description": "role name" }, "color": { "type": "integer", "description": "integer representation of hexadecimal color code" }, "hoist": { "type": "boolean", "description": "if this role is pinned in the user listing" }, "icon": { "type": "string", "description": "role [icon hash](#DOCS_REFERENCE/image-formatting)" }, "unicode_emoji": { "type": "string", "description": "role unicode emoji" }, "position": { "type": "integer", "description": "position of this role" }, "permissions": { "type": "string", "description": "permission bit set" }, "managed": { "type": "boolean", "description": "whether this role is managed by an integration" }, "mentionable": { "type": "boolean", "description": "whether this role is mentionable" }, "tags": { "type": "object", "description": "the tags this role has" } }, "required": [ "id", "name", "color", "hoist", "position", "permissions", "managed", "mentionable" ] }, "RoleTags": { "type": "object", "properties": { "bot_id": { "type": "string", "description": "the id of the bot this role belongs to" }, "integration_id": { "type": "string", "description": "the id of the integration this role belongs to" }, "premium_subscriber": { "type": "boolean", "description": "whether this is the guild's Booster role" }, "subscription_listing_id": { "type": "string", "description": "the id of this role's subscription sku and listing" }, "available_for_purchase": { "type": "boolean", "description": "whether this role is available for purchase" }, "guild_connections": { "type": "boolean", "description": "whether this role is a guild's linked role" } } }, "RateLimitResponse": { "type": "object", "properties": { "message": { "type": "string", "description": "A message saying you are being rate limited." }, "retry_after": { "type": "number", "description": "The number of seconds to wait before submitting another request." }, "global": { "type": "boolean", "description": "A value indicating if you are being globally rate limited or not" }, "code": { "type": "integer", "description": "An [error code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/json) for some limits" } }, "required": [ "message", "retry_after", "global" ] }, "Payload": { "type": "object", "properties": { "cmd": { "type": "object", "description": "[payload command](#DOCS_TOPICS_RPC/commands-and-events-rpc-commands)" }, "nonce": { "type": "string", "description": "unique string used once for replies from the server" }, "evt": { "type": "object", "description": "[subscription event](#DOCS_TOPICS_RPC/commands-and-events-rpc-events)" }, "data": { "type": "object", "description": "event data" }, "args": { "type": "object", "description": "command arguments" } }, "required": [ "cmd", "nonce", "evt", "data", "args" ] }, "AuthorizeArgument": { "type": "object", "properties": { "scopes": { "type": "array", "description": "scopes to authorize", "items": { "type": "object" } }, "client_id": { "type": "string", "description": "OAuth2 application id" }, "rpc_token": { "type": "string", "description": "one-time use RPC token" }, "username": { "type": "string", "description": "username to create a guest account with if the user does not have Discord" } }, "required": [ "scopes", "client_id", "rpc_token", "username" ] }, "AuthorizeResponse": { "type": "object", "properties": { "code": { "type": "string", "description": "OAuth2 authorization code" } }, "required": [ "code" ] }, "AuthenticateArgument": { "type": "object", "properties": { "access_token": { "type": "string", "description": "OAuth2 access token" } }, "required": [ "access_token" ] }, "AuthenticateResponse": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User", "description": "the authed user" }, "scopes": { "type": "array", "description": "authorized scopes", "items": { "type": "object" } }, "expires": { "type": "string", "description": "expiration date of OAuth2 token", "format": "date-time" }, "application": { "type": "object", "description": "application the user authorized" } }, "required": [ "user", "scopes", "expires", "application" ] }, "OAuth2Application": { "type": "object", "properties": { "description": { "type": "string", "description": "application description" }, "icon": { "type": "string", "description": "hash of the icon" }, "id": { "type": "string", "description": "application client id" }, "rpc_origins": { "type": "array", "description": "array of rpc origin urls", "items": { "type": "string" } }, "name": { "type": "string", "description": "application name" } }, "required": [ "description", "icon", "id", "rpc_origins", "name" ] }, "GetGuildsResponse": { "type": "object", "properties": { "guilds": { "type": "array", "description": "the guilds the user is in", "items": { "$ref": "#/components/schemas/Guild" } } }, "required": [ "guilds" ] }, "GetGuildArgument": { "type": "object", "properties": { "guild_id": { "type": "string", "description": "id of the guild to get" }, "timeout": { "type": "integer", "description": "asynchronously get guild with time to wait before timing out" } }, "required": [ "guild_id", "timeout" ] }, "GetGuildResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "guild id" }, "name": { "type": "string", "description": "guild name" }, "icon_url": { "type": "string", "description": "guild icon url" }, "members": { "type": "array", "description": "members of the guild (deprecated; always empty array)", "items": { "$ref": "#/components/schemas/GuildMember" } } }, "required": [ "id", "name", "icon_url", "members" ] }, "GetChannelArgument": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "id of the channel to get" } }, "required": [ "channel_id" ] }, "GetChannelResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "channel id" }, "guild_id": { "type": "string", "description": "channel's guild id" }, "name": { "type": "string", "description": "channel name" }, "type": { "type": "integer", "description": "channel type (guild text: 0, guild voice: 2, dm: 1, group dm: 3)" }, "topic": { "type": "string", "description": "(text) channel topic" }, "bitrate": { "type": "integer", "description": "(voice) bitrate of voice channel" }, "user_limit": { "type": "integer", "description": "(voice) user limit of voice channel (0 for none)" }, "position": { "type": "integer", "description": "position of channel in channel list" }, "voice_states": { "type": "array", "description": "(voice) channel's voice states", "items": { "$ref": "#/components/schemas/VoiceState" } }, "messages": { "type": "array", "description": "(text) channel's messages", "items": { "$ref": "#/components/schemas/Message" } } }, "required": [ "id", "guild_id", "name", "type", "topic", "bitrate", "user_limit", "position", "voice_states", "messages" ] }, "GetChannelsArgument": { "type": "object", "properties": { "guild_id": { "type": "string", "description": "id of the guild to get channels for" } }, "required": [ "guild_id" ] }, "GetChannelsResponse": { "type": "object", "properties": { "channels": { "type": "array", "description": "guild channels the user is in", "items": { "$ref": "#/components/schemas/Channel" } } }, "required": [ "channels" ] }, "SetUserVoiceSettingsArgumentandResponse": { "type": "object", "properties": { "user_id": { "type": "string", "description": "user id" }, "pan": { "$ref": "#/components/schemas/Pan", "description": "set the pan of the user" }, "volume": { "type": "integer", "description": "set the volume of user (defaults to 100, min 0, max 200)" }, "mute": { "type": "boolean", "description": "set the mute state of the user" } }, "required": [ "user_id" ] }, "Pan": { "type": "object", "properties": { "left": { "type": "number", "description": "left pan of user (min: 0.0, max: 1.0)" }, "right": { "type": "number", "description": "right pan of user (min: 0.0, max: 1.0)" } }, "required": [ "left", "right" ] }, "SelectVoiceChannelArgument": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "channel id to join (or `null` to leave)" }, "timeout": { "type": "integer", "description": "asynchronously join channel with time to wait before timing out" }, "force": { "type": "boolean", "description": "forces a user to join a voice channel" } }, "required": [ "channel_id", "timeout", "force" ] }, "SelectTextChannelArgument": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "channel id to join (or `null` to leave)" }, "timeout": { "type": "integer", "description": "asynchronously join channel with time to wait before timing out" } }, "required": [ "channel_id", "timeout" ] }, "GetVoiceSettingsResponse": { "type": "object", "properties": { "input": { "$ref": "#/components/schemas/VoiceSettingsInput", "description": "input settings" }, "output": { "$ref": "#/components/schemas/VoiceSettingsOutput", "description": "output settings" }, "mode": { "$ref": "#/components/schemas/VoiceSettingsMode", "description": "voice mode settings" }, "automatic_gain_control": { "type": "boolean", "description": "state of automatic gain control" }, "echo_cancellation": { "type": "boolean", "description": "state of echo cancellation" }, "noise_suppression": { "type": "boolean", "description": "state of noise suppression" }, "qos": { "type": "boolean", "description": "state of voice quality of service" }, "silence_warning": { "type": "boolean", "description": "state of silence warning notice" }, "deaf": { "type": "boolean", "description": "state of self-deafen" }, "mute": { "type": "boolean", "description": "state of self-mute" } }, "required": [ "input", "output", "mode", "automatic_gain_control", "echo_cancellation", "noise_suppression", "qos", "silence_warning", "deaf", "mute" ] }, "VoiceSettingsInput": { "type": "object", "properties": { "device_id": { "type": "string", "description": "device id" }, "volume": { "type": "number", "description": "input voice level (min: 0, max: 100)" }, "available_devices": { "type": "array", "description": "array of _read-only_ device objects containing `id` and `name` string keys", "items": { "type": "object" } } }, "required": [ "device_id", "volume", "available_devices" ] }, "VoiceSettingsOutput": { "type": "object", "properties": { "device_id": { "type": "string", "description": "device id" }, "volume": { "type": "number", "description": "output voice level (min: 0, max: 200)" }, "available_devices": { "type": "array", "description": "array of _read-only_ device objects containing `id` and `name` string keys", "items": { "type": "object" } } }, "required": [ "device_id", "volume", "available_devices" ] }, "VoiceSettingsMode": { "type": "object", "properties": { "type": { "type": "string", "description": "voice setting mode type (can be `PUSH_TO_TALK` or `VOICE_ACTIVITY`)" }, "auto_threshold": { "type": "boolean", "description": "voice activity threshold automatically sets its threshold" }, "threshold": { "type": "number", "description": "threshold for voice activity (in dB) (min: -100, max: 0)" }, "shortcut": { "$ref": "#/components/schemas/ShortcutKeyCombo", "description": "shortcut key combos for PTT" }, "delay": { "type": "number", "description": "the PTT release delay (in ms) (min: 0, max: 2000)" } }, "required": [ "type", "auto_threshold", "threshold", "shortcut", "delay" ] }, "ShortcutKeyCombo": { "type": "object", "properties": { "type": { "type": "integer", "description": "see [key types](#DOCS_TOPICS_RPC/getvoicesettings-key-types)" }, "code": { "type": "integer", "description": "key code" }, "name": { "type": "string", "description": "key name" } }, "required": [ "type", "code", "name" ] }, "Key": { "type": "object", "properties": {} }, "SetVoiceSettingsArgumentandResponse": { "type": "object", "properties": { "input": { "$ref": "#/components/schemas/VoiceSettingsInput", "description": "input settings" }, "output": { "$ref": "#/components/schemas/VoiceSettingsOutput", "description": "output settings" }, "mode": { "$ref": "#/components/schemas/VoiceSettingsMode", "description": "voice mode settings" }, "automatic_gain_control": { "type": "boolean", "description": "state of automatic gain control" }, "echo_cancellation": { "type": "boolean", "description": "state of echo cancellation" }, "noise_suppression": { "type": "boolean", "description": "state of noise suppression" }, "qos": { "type": "boolean", "description": "state of voice quality of service" }, "silence_warning": { "type": "boolean", "description": "state of silence warning notice" }, "deaf": { "type": "boolean", "description": "state of self-deafen" }, "mute": { "type": "boolean", "description": "state of self-mute" } }, "required": [ "input", "output", "mode", "automatic_gain_control", "echo_cancellation", "noise_suppression", "qos", "silence_warning", "deaf", "mute" ] }, "SubscribeResponse": { "type": "object", "properties": { "evt": { "type": "string", "description": "event name now subscribed to" } }, "required": [ "evt" ] }, "UnsubscribeResponse": { "type": "object", "properties": { "evt": { "type": "string", "description": "event name now unsubscribed from" } }, "required": [ "evt" ] }, "SetCertifiedDevicesArgument": { "type": "object", "properties": { "devices": { "type": "array", "description": "a list of devices for your manufacturer, in order of priority", "items": { "$ref": "#/components/schemas/Device" } } }, "required": [ "devices" ] }, "SetActivityArgument": { "type": "object", "properties": { "pid": { "type": "integer", "description": "the application's process id" }, "activity": { "$ref": "#/components/schemas/Activity", "description": "the rich presence to assign to the user" } }, "required": [ "pid", "activity" ] }, "SendActivityJoinInviteArgument": { "type": "object", "properties": { "user_id": { "type": "string", "description": "the id of the requesting user" } }, "required": [ "user_id" ] }, "CloseActivityRequestArgument": { "type": "object", "properties": { "user_id": { "type": "string", "description": "the id of the requesting user" } }, "required": [ "user_id" ] }, "ReadyDispatchData": { "type": "object", "properties": { "v": { "type": "integer", "description": "RPC version" }, "config": { "$ref": "#/components/schemas/RPCServerConfiguration", "description": "server configuration" }, "user": { "$ref": "#/components/schemas/User", "description": "the user to whom you are connected" } }, "required": [ "v", "config", "user" ] }, "RPCServerConfiguration": { "type": "object", "properties": { "cdn_host": { "type": "string", "description": "server's cdn" }, "api_endpoint": { "type": "string", "description": "server's api endpoint" }, "environment": { "type": "string", "description": "server's environment" } }, "required": [ "cdn_host", "api_endpoint", "environment" ] }, "ErrorData": { "type": "object", "properties": { "code": { "type": "integer", "description": "RPC Error Code" }, "message": { "type": "string", "description": "Error description" } }, "required": [ "code", "message" ] }, "GuildStatusArgument": { "type": "object", "properties": { "guild_id": { "type": "string", "description": "id of guild to listen to updates of" } }, "required": [ "guild_id" ] }, "GuildStatusDispatchData": { "type": "object", "properties": { "guild": { "$ref": "#/components/schemas/Guild", "description": "guild with requested id" }, "online": { "type": "integer", "description": "number of online users in guild (deprecated; always 0)" } }, "required": [ "guild", "online" ] }, "GuildCreateDispatchData": { "type": "object", "properties": { "id": { "type": "string", "description": "guild id" }, "name": { "type": "string", "description": "name of the guild" } }, "required": [ "id", "name" ] }, "ChannelCreateDispatchData": { "type": "object", "properties": { "id": { "type": "string", "description": "channel id" }, "name": { "type": "string", "description": "name of the channel" }, "type": { "type": "integer", "description": "channel type (guild text: 0, guild voice: 2, dm: 1, group dm: 3)" } }, "required": [ "id", "name", "type" ] }, "VoiceChannelSelectDispatchData": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "id of channel (`null` if none)" }, "guild_id": { "type": "string", "description": "id of guild (`null` if none)" } }, "required": [ "channel_id", "guild_id" ] }, "VoiceSettingsArgument": { "type": "object", "properties": {} }, "VoiceStateArgument": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "id of channel to listen to updates of" } }, "required": [ "channel_id" ] }, "VoiceConnectionStatusDispatchData": { "type": "object", "properties": { "state": { "type": "string", "description": "one of the voice connection states listed below" }, "hostname": { "type": "string", "description": "hostname of the connected voice server" }, "pings": { "type": "array", "description": "last 20 pings (in ms)", "items": { "type": "integer" } }, "average_ping": { "type": "integer", "description": "average ping (in ms)" }, "last_ping": { "type": "integer", "description": "last ping (in ms)" } }, "required": [ "state", "hostname", "pings", "average_ping", "last_ping" ] }, "MessageArgument": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "id of channel to listen to updates of" } }, "required": [ "channel_id" ] }, "SpeakingArgument": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "id of channel to listen to updates of" } }, "required": [ "channel_id" ] }, "SpeakingDispatchData": { "type": "object", "properties": { "user_id": { "type": "string", "description": "id of user who started/stopped speaking" } }, "required": [ "user_id" ] }, "NotificationCreateDispatchData": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "id of channel where notification occurred" }, "message": { "$ref": "#/components/schemas/Message", "description": "message that generated this notification" }, "icon_url": { "type": "string", "description": "icon url of the notification" }, "title": { "type": "string", "description": "title of the notification" }, "body": { "type": "string", "description": "body of the notification" } }, "required": [ "channel_id", "message", "icon_url", "title", "body" ] }, "ActivityJoinDispatchData": { "type": "object", "properties": { "secret": { "type": "string", "description": "the [`join_secret`](#DOCS_RICH_PRESENCE_HOW_TO/updating-presence-update-presence-payload-fields) for the given invite" } }, "required": [ "secret" ] }, "ActivitySpectateDispatchData": { "type": "object", "properties": { "secret": { "type": "string", "description": "the [`spectate_secret`](#DOCS_RICH_PRESENCE_HOW_TO/updating-presence-update-presence-payload-fields) for the given invite" } }, "required": [ "secret" ] }, "ActivityJoinRequestData": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User", "description": "information about the user requesting to join" } }, "required": [ "user" ] }, "Team": { "type": "object", "properties": { "icon": { "type": "string", "description": "a hash of the image of the team's icon" }, "id": { "type": "string", "description": "the unique id of the team" }, "members": { "type": "array", "description": "the members of the team", "items": { "$ref": "#/components/schemas/TeamMember" } }, "name": { "type": "string", "description": "the name of the team" }, "owner_user_id": { "type": "string", "description": "the user id of the current team owner" } }, "required": [ "icon", "id", "members", "name", "owner_user_id" ] }, "TeamMember": { "type": "object", "properties": { "membership_state": { "type": "integer", "description": "the user's [membership state](#DOCS_TOPICS_TEAMS/data-models-membership-state-enum) on the team" }, "permissions": { "type": "array", "description": "will always be `[\"*\"]`", "items": { "type": "string" } }, "team_id": { "type": "string", "description": "the id of the parent team of which they are a member" }, "user": { "$ref": "#/components/schemas/User", "description": "the avatar, discriminator, id, and username of the user" } }, "required": [ "membership_state", "permissions", "team_id", "user" ] }, "VoicePacket": { "type": "object", "properties": { "Version": { "type": "integer" }, "Payload Type": { "type": "integer" }, "Sequence": { "type": "integer" }, "Timestamp": { "type": "integer" }, "SSRC": { "type": "integer" } }, "required": [ "Version", "Payload Type", "Sequence", "Timestamp", "SSRC", "Encrypted audio" ] }, "ApplicationCommand": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique ID of command" }, "type": { "type": "object", "description": "[Type of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types), defaults to `1`" }, "application_id": { "type": "string", "description": "ID of the parent application" }, "guild_id": { "type": "string", "description": "Guild ID of the command, if not global" }, "name": { "type": "string", "description": "[Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters" }, "name_localizations": { "type": "object", "description": "Localization dictionary for `name` field. Values follow the same restrictions as `name`" }, "description": { "type": "string", "description": "Description for `CHAT_INPUT` commands, 1-100 characters. Empty string for `USER` and `MESSAGE` commands" }, "description_localizations": { "type": "object", "description": "Localization dictionary for `description` field. Values follow the same restrictions as `description`" }, "options": { "type": "array", "description": "Parameters for the command, max of 25", "items": { "type": "object" } }, "default_member_permissions": { "type": "string", "description": "Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set" }, "dm_permission": { "type": "boolean", "description": "Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible." }, "default_permission": { "type": "boolean", "description": "Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to `true`" }, "nsfw": { "type": "boolean", "description": "Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands), defaults to `false`" }, "version": { "type": "string", "description": "Autoincrementing version identifier updated during substantial record changes" } }, "required": [ "id", "application_id", "name", "description", "default_member_permissions", "version" ] }, "ApplicationCommandOption": { "type": "object", "properties": { "type": { "type": "object", "description": "Type of option" }, "name": { "type": "string", "description": "[1-32 character name](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming)" }, "name_localizations": { "type": "object", "description": "Localization dictionary for the `name` field. Values follow the same restrictions as `name`" }, "description": { "type": "string", "description": "1-100 character description" }, "description_localizations": { "type": "object", "description": "Localization dictionary for the `description` field. Values follow the same restrictions as `description`" }, "required": { "type": "boolean", "description": "If the parameter is required or optional--default `false`" }, "choices": { "type": "array", "description": "Choices for `STRING`, `INTEGER`, and `NUMBER` types for the user to pick from, max 25", "items": { "type": "object" } }, "options": { "type": "array", "description": "If the option is a subcommand or subcommand group type, these nested options will be the parameters", "items": { "type": "object" } }, "channel_types": { "type": "array", "description": "If the option is a channel type, the channels shown will be restricted to these types", "items": { "type": "object" } }, "min_value": { "type": "integer", "description": "If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted" }, "max_value": { "type": "integer", "description": "If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted" }, "min_length": { "type": "integer", "description": "For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`)" }, "max_length": { "type": "integer", "description": "For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`)" }, "autocomplete": { "type": "boolean", "description": "If autocomplete interactions are enabled for this `STRING`, `INTEGER`, or `NUMBER` type option" } }, "required": [ "type", "name", "description" ] }, "ApplicationCommandOptionChoice": { "type": "object", "properties": { "name": { "type": "string", "description": "1-100 character choice name" }, "name_localizations": { "type": "object", "description": "Localization dictionary for the `name` field. Values follow the same restrictions as `name`" }, "value": { "type": "string", "description": "Value for the choice, up to 100 characters if string" } }, "required": [ "name", "value" ] }, "GuildApplicationCommandPermissions": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the command or the application ID" }, "application_id": { "type": "string", "description": "ID of the application the command belongs to" }, "guild_id": { "type": "string", "description": "ID of the guild" }, "permissions": { "type": "array", "description": "Permissions for the command in the guild, max of 100", "items": { "type": "object" } } }, "required": [ "id", "application_id", "guild_id", "permissions" ] }, "ApplicationCommandPermissions": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the role, user, or channel. It can also be a [permission constant](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-constants)" }, "type": { "type": "object", "description": "role (`1`), user (`2`), or channel (`3`)" }, "permission": { "type": "boolean", "description": "`true` to allow, `false`, to disallow" } }, "required": [ "id", "type", "permission" ] }, "Component": { "type": "object", "properties": {} }, "Button": { "type": "object", "properties": { "type": { "type": "integer", "description": "`2` for a button" }, "style": { "type": "integer", "description": "A [button style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles)" }, "label": { "type": "string", "description": "Text that appears on the button; max 80 characters" }, "emoji": { "$ref": "#/components/schemas/Emoji", "description": "`name`, `id`, and `animated`" }, "custom_id": { "type": "string", "description": "Developer-defined identifier for the button; max 100 characters" }, "url": { "type": "string", "description": "URL for link-style buttons" }, "disabled": { "type": "boolean", "description": "Whether the button is disabled (defaults to `false`)" } }, "required": [ "type", "style" ] }, "SelectMenu": { "type": "object", "properties": { "type": { "type": "integer", "description": "[Type](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) of select menu component (text: `3`, user: `5`, role: `6`, mentionable: `7`, channels: `8`)" }, "custom_id": { "type": "string", "description": "ID for the select menu; max 100 characters" }, "options": { "type": "array", "description": "Specified choices in a select menu (only required and available for string selects (type `3`); max 25", "items": { "type": "object" } }, "channel_types": { "type": "array", "description": "List of channel types to include in the channel select component (type `8`)", "items": { "type": "object" } }, "placeholder": { "type": "string", "description": "Placeholder text if nothing is selected; max 150 characters" }, "min_values": { "type": "integer", "description": "Minimum number of items that must be chosen (defaults to 1); min 0, max 25" }, "max_values": { "type": "integer", "description": "Maximum number of items that can be chosen (defaults to 1); max 25" }, "disabled": { "type": "boolean", "description": "Whether select menu is disabled (defaults to `false`)" } }, "required": [ "type", "custom_id" ] }, "SelectOption": { "type": "object", "properties": { "label": { "type": "string", "description": "User-facing name of the option; max 100 characters" }, "value": { "type": "string", "description": "Dev-defined value of the option; max 100 characters" }, "description": { "type": "string", "description": "Additional description of the option; max 100 characters" }, "emoji": { "$ref": "#/components/schemas/Emoji", "description": "`id`, `name`, and `animated`" }, "default": { "type": "boolean", "description": "Will show this option as selected by default" } }, "required": [ "label", "value" ] }, "SelectMenuResolved": { "type": "object", "properties": {} }, "ExampleResolved": { "type": "object", "properties": {} }, "TextInput": { "type": "object", "properties": { "type": { "type": "integer", "description": "`4` for a text input" }, "custom_id": { "type": "string", "description": "Developer-defined identifier for the input; max 100 characters" }, "style": { "type": "integer", "description": "The [Text Input Style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/text-inputs-text-input-styles)" }, "label": { "type": "string", "description": "Label for this component; max 45 characters" }, "min_length": { "type": "integer", "description": "Minimum input length for a text input; min 0, max 4000" }, "max_length": { "type": "integer", "description": "Maximum input length for a text input; min 1, max 4000" }, "required": { "type": "boolean", "description": "Whether this component is required to be filled (defaults to `true`)" }, "value": { "type": "string", "description": "Pre-filled value for this component; max 4000 characters" }, "placeholder": { "type": "string", "description": "Custom placeholder text if the input is empty; max 100 characters" } }, "required": [ "type", "custom_id", "style", "label" ] }, "Interaction": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the interaction" }, "application_id": { "type": "string", "description": "ID of the application this interaction is for" }, "type": { "type": "object", "description": "Type of interaction" }, "data": { "type": "object", "description": "Interaction data payload" }, "guild_id": { "type": "string", "description": "Guild that the interaction was sent from" }, "channel": { "$ref": "#/components/schemas/Channel", "description": "Channel that the interaction was sent from" }, "channel_id": { "type": "string", "description": "Channel that the interaction was sent from" }, "member": { "$ref": "#/components/schemas/GuildMember", "description": "Guild member data for the invoking user, including permissions" }, "user": { "$ref": "#/components/schemas/User", "description": "User object for the invoking user, if invoked in a DM" }, "token": { "type": "string", "description": "Continuation token for responding to the interaction" }, "version": { "type": "integer", "description": "Read-only property, always `1`" }, "message": { "$ref": "#/components/schemas/Message", "description": "For components, the message they were attached to" }, "app_permissions": { "type": "string", "description": "Bitwise set of permissions the app or bot has within the channel the interaction was sent from" }, "locale": { "type": "string", "description": "Selected [language](#DOCS_REFERENCE/locales) of the invoking user" }, "guild_locale": { "type": "string", "description": "[Guild's preferred locale](#DOCS_RESOURCES_GUILD/guild-object), if invoked in a guild" } }, "required": [ "id", "application_id", "type", "token", "version" ] }, "ApplicationCommandData": { "type": "object", "properties": { "id": { "type": "string", "description": "the [`ID`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) of the invoked command" }, "name": { "type": "string", "description": "the [`name`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) of the invoked command" }, "type": { "type": "integer", "description": "the [`type`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) of the invoked command" }, "resolved": { "type": "object", "description": "converted users + roles + channels + attachments" }, "options": { "type": "array", "description": "the params + values from the user", "items": { "type": "object" } }, "guild_id": { "type": "string", "description": "the id of the guild the command is registered to" }, "target_id": { "type": "string", "description": "id of the user or message targeted by a [user](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands) or [message](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands) command" } }, "required": [ "id", "name", "type" ] }, "MessageComponentData": { "type": "object", "properties": { "custom_id": { "type": "string", "description": "the [`custom_id`](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/custom-id) of the component" }, "component_type": { "type": "integer", "description": "the [type](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) of the component" }, "values": { "type": "array", "description": "values the user selected in a [select menu](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object) component", "items": { "type": "object" } } }, "required": [ "custom_id", "component_type" ] }, "ModalSubmitData": { "type": "object", "properties": { "custom_id": { "type": "string", "description": "the [`custom_id`](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/custom-id) of the modal" }, "components": { "type": "array", "description": "the values submitted by the user", "items": { "type": "object" } } }, "required": [ "custom_id", "components" ] }, "ResolvedData": { "type": "object", "properties": { "users": { "$ref": "#/components/schemas/User", "description": "the ids and User objects" }, "members": { "$ref": "#/components/schemas/GuildMember", "description": "the ids and partial Member objects" }, "roles": { "$ref": "#/components/schemas/Role", "description": "the ids and Role objects" }, "channels": { "$ref": "#/components/schemas/Channel", "description": "the ids and partial Channel objects" }, "messages": { "$ref": "#/components/schemas/Message", "description": "the ids and partial Message objects" }, "attachments": { "$ref": "#/components/schemas/Attachment", "description": "the ids and attachment objects" } } }, "ApplicationCommandInteractionDataOption": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the parameter" }, "type": { "type": "integer", "description": "Value of [application command option type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-type)" }, "value": { "type": "string", "description": "Value of the option resulting from user input" }, "options": { "type": "array", "description": "Present if this option is a group or subcommand", "items": { "type": "object" } }, "focused": { "type": "boolean", "description": "`true` if this option is the currently focused option for autocomplete" } }, "required": [ "name", "type" ] }, "MessageInteraction": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the interaction" }, "type": { "type": "object", "description": "Type of interaction" }, "name": { "type": "string", "description": "Name of the [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure), including subcommands and subcommand groups" }, "user": { "$ref": "#/components/schemas/User", "description": "User who invoked the interaction" }, "member": { "$ref": "#/components/schemas/GuildMember", "description": "Member who invoked the interaction in the guild" } }, "required": [ "id", "type", "name", "user" ] }, "InteractionResponse": { "type": "object", "properties": { "type": { "type": "object", "description": "the type of response" }, "data": { "type": "object", "description": "an optional response message" } }, "required": [ "type" ] }, "InteractionCallbackData": { "type": "object", "properties": {} } } }, "info": { "title": "Discord API", "version": "10.0.0" }, "openapi": "3.0.0", "paths": { "/applications/{application_id}/role-connections/metadata": { "get": { "operationId": "getApplicationsRoleConnectionsMetadata", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationRoleConnectionMetadata" } } } }, "description": "Returns a list of application role connection metadata objects for the given application." } } }, "put": { "operationId": "putApplicationsRoleConnectionsMetadata", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Updates and returns a list of application role connection metadata objects for the given application.\r" } } } }, "/guilds/{guild_id}/audit-logs": { "get": { "operationId": "getGuildsAuditLogs", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditLog" } } }, "description": "Returns an audit log object for the guild. Requires the `VIEW_AUDIT_LOG` permission.\r" } } } }, "/guilds/{guild_id}/auto-moderation/rules": { "get": { "operationId": "getGuildsAutoModerationRules", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AutoModerationRule" } } } }, "description": "Get a list of all rules currently configured for the guild. Returns a list of auto moderation rule objects for the given guild.\r" } } }, "post": { "operationId": "postGuildsAutoModerationRules", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoModerationRule" } } }, "description": "Create a new rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "the rule name" }, "event_type": { "type": "integer", "description": "the [event type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-event-types)" }, "trigger_type": { "type": "integer", "description": "the [trigger type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types)" }, "trigger_metadata": { "type": "object", "description": "the [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata)" }, "actions": { "type": "array", "description": "the actions which will execute when the rule is triggered", "items": { "$ref": "#/components/schemas/AutoModerationAction" } }, "enabled": { "type": "boolean", "description": "whether the rule is enabled (False by default)" }, "exempt_roles": { "type": "array", "description": "the role ids that should not be affected by the rule (Maximum of 20)", "items": { "type": "string" } }, "exempt_channels": { "type": "array", "description": "the channel ids that should not be affected by the rule (Maximum of 50)", "items": { "type": "string" } } }, "required": [ "name", "event_type", "trigger_type", "actions" ] } } }, "required": true } } }, "/guilds/{guild_id}/auto-moderation/rules/{auto_moderation_rule_id}": { "get": { "operationId": "getGuildsAutoModerationRule", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "auto_moderation_rule_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoModerationRule" } } }, "description": "Get a single rule. Returns an auto moderation rule object.\r" } } }, "patch": { "operationId": "patchGuildsAutoModerationRule", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "auto_moderation_rule_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoModerationRule" } } }, "description": "Modify an existing rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "the rule name" }, "event_type": { "type": "integer", "description": "the [event type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-event-types)" }, "trigger_metadata": { "type": "object", "description": "the [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata)" }, "actions": { "type": "array", "description": "the actions which will execute when the rule is triggered", "items": { "$ref": "#/components/schemas/AutoModerationAction" } }, "enabled": { "type": "boolean", "description": "whether the rule is enabled" }, "exempt_roles": { "type": "array", "description": "the role ids that should not be affected by the rule (Maximum of 20)", "items": { "type": "string" } }, "exempt_channels": { "type": "array", "description": "the channel ids that should not be affected by the rule (Maximum of 50)", "items": { "type": "string" } } }, "required": [ "name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels" ] } } }, "required": true } }, "delete": { "operationId": "deleteGuildsAutoModerationRule", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "auto_moderation_rule_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a rule. Returns a `204` on success. Fires an Auto Moderation Rule Delete Gateway event.\r" } } } }, "/channels/{channel_id}": { "get": { "operationId": "getChannel", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result." } } }, "patch": { "operationId": "patchChannel", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "OK" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "1-100 character channel name" }, "archived": { "type": "boolean", "description": "whether the thread is archived" }, "auto_archive_duration": { "type": "integer", "description": "the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080" }, "locked": { "type": "boolean", "description": "whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it" }, "invitable": { "type": "boolean", "description": "whether non-moderators can add other non-moderators to a thread; only available on private threads" }, "rate_limit_per_user": { "type": "integer", "description": "amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages`, `manage_thread`, or `manage_channel`, are unaffected" }, "flags": { "type": "integer", "description": "[channel flags](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field); `PINNED` can only be set for threads in forum channels" }, "applied_tags": { "type": "array", "description": "the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` channel; limited to 5", "items": { "type": "string" } } }, "required": [ "name", "archived", "auto_archive_duration", "locked", "invitable", "rate_limit_per_user" ] } } }, "required": true } } }, "/channels/{channel_id}/messages": { "get": { "operationId": "getChannelsMessages", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Message" } } } }, "description": "Retrieves the messages in a channel. Returns an array of message objects on success.\r" } } }, "post": { "operationId": "postChannelsMessages", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } }, "description": "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.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string", "description": "Message contents (up to 2000 characters)" }, "nonce": { "type": "integer", "description": "Can be used to verify a message was sent (up to 25 characters). Value will appear in the [Message Create event](#DOCS_TOPICS_GATEWAY_EVENTS/message-create)." }, "tts": { "type": "boolean", "description": "`true` if this is a TTS message" }, "embeds": { "type": "array", "description": "Up to 10 `rich` embeds (up to 6000 characters)", "items": { "$ref": "#/components/schemas/Embed" } }, "allowed_mentions": { "$ref": "#/components/schemas/AllowedMentions", "description": "Allowed mentions for the message" }, "message_reference": { "type": "object", "description": "Include to make your message a reply" }, "components": { "type": "array", "description": "Components to include with the message", "items": { "$ref": "#/components/schemas/Component" } }, "sticker_ids": { "type": "array", "description": "IDs of up to 3 [stickers](#DOCS_RESOURCES_STICKER/sticker-object) in the server to send in the message", "items": { "type": "string" } }, "payload_json": { "type": "string", "description": "JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](#DOCS_REFERENCE/uploading-files)" }, "attachments": { "type": "array", "description": "Attachment objects with filename and description. See [Uploading Files](#DOCS_REFERENCE/uploading-files)", "items": { "$ref": "#/components/schemas/Attachment" } }, "flags": { "type": "integer", "description": "[Message flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set)" } } } } }, "required": true } } }, "/channels/{channel_id}/messages/{message_id}": { "get": { "operationId": "getChannelsMessage", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } }, "description": "Retrieves a specific message in the channel. Returns a message object on success.\r" } } }, "patch": { "operationId": "patchChannelsMessage", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } }, "description": "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).\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string", "description": "Message contents (up to 2000 characters)" }, "embeds": { "type": "array", "description": "Up to 10 `rich` embeds (up to 6000 characters)", "items": { "$ref": "#/components/schemas/Embed" } }, "flags": { "type": "integer", "description": "Edit the [flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) of a message (only `SUPPRESS_EMBEDS` can currently be set/unset)" }, "allowed_mentions": { "$ref": "#/components/schemas/AllowedMentions", "description": "Allowed mentions for the message" }, "components": { "type": "array", "description": "Components to include with the message", "items": { "$ref": "#/components/schemas/Component" } }, "payload_json": { "type": "string", "description": "JSON-encoded body of non-file params (multipart/form-data only). See [Uploading Files](#DOCS_REFERENCE/uploading-files)" }, "attachments": { "type": "array", "description": "Attached files to keep and possible descriptions for new files. See [Uploading Files](#DOCS_REFERENCE/uploading-files)", "items": { "$ref": "#/components/schemas/Attachment" } } }, "required": [ "content", "embeds", "flags", "allowed_mentions", "components", "files", "payload_json", "attachments" ] } } }, "required": true } }, "delete": { "operationId": "deleteChannelsMessage", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "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.\r" } } } }, "/channels/{channel_id}/messages/{message_id}/crosspost": { "post": { "operationId": "postChannelsMessagesCrosspost", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } }, "description": "Crosspost a message in an Announcement 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.\r" } } } }, "/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/@me": { "put": { "operationId": "putChannelsMessagesReactionsEmojiMe", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "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. Fires a Message Reaction Add Gateway event.\r" } } }, "delete": { "operationId": "deleteChannelsMessagesReactionsEmojiMe", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a reaction the current user has made for the message. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.\r" } } } }, "/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/{user_id}": { "delete": { "operationId": "deleteChannelsMessagesReactionsUser", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "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. Fires a Message Reaction Remove Gateway event.\r" } } } }, "/channels/{channel_id}/messages/{message_id}/reactions/{emoji}": { "get": { "operationId": "getChannelsMessagesReactionsEmoji", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } } }, "description": "Get a list of users that reacted with this emoji. Returns an array of user objects on success.\r" } } }, "delete": { "operationId": "deleteChannelsMessagesReactionsEmoji", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "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.\r" } } } }, "/channels/{channel_id}/messages/{message_id}/reactions": { "delete": { "operationId": "deleteChannelsMessagesReactions", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "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." } } } }, "/channels/{channel_id}/messages/bulk-delete": { "post": { "operationId": "postChannelsMessagesBulkDelete", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "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.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "description": "an array of message ids to delete (2-100)", "items": { "type": "string" } } }, "required": [ "messages" ] } } }, "required": true } } }, "/channels/{channel_id}/permissions/{overwrite_id}": { "put": { "operationId": "putChannelsPermission", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "overwrite_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a `MANAGE_ROLES` overwrite in the channel). Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "allow": { "type": "string", "description": "the bitwise value of all allowed permissions (default `\"0\"`)" }, "deny": { "type": "string", "description": "the bitwise value of all disallowed permissions (default `\"0\"`)" }, "type": { "type": "integer", "description": "0 for a role or 1 for a member" } }, "required": [ "type" ] } } }, "required": true } }, "delete": { "operationId": "deleteChannelsPermission", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "overwrite_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions\r" } } } }, "/channels/{channel_id}/invites": { "get": { "operationId": "getChannelsInvites", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Invite" } } } }, "description": "Returns a list of invite objects (with invite metadata) for the channel. Only usable for guild channels. Requires the `MANAGE_CHANNELS` permission." } } }, "post": { "operationId": "postChannelsInvites", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invite" } } }, "description": "Create a new invite object for the channel. Only usable for guild channels. Requires the `CREATE_INSTANT_INVITE` permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object (`{}`). Returns an invite object. Fires an Invite Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "max_age": { "type": "integer", "description": "duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days)" }, "max_uses": { "type": "integer", "description": "max number of uses or 0 for unlimited. between 0 and 100" }, "temporary": { "type": "boolean", "description": "whether this invite only grants temporary membership" }, "unique": { "type": "boolean", "description": "if true, don't try to reuse a similar invite (useful for creating many unique one time use invites)" }, "target_type": { "type": "integer", "description": "the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite" }, "target_user_id": { "type": "string", "description": "the id of the user whose stream to display for this invite, required if `target_type` is 1, the user must be streaming in the channel" }, "target_application_id": { "type": "string", "description": "the id of the embedded application to open for this invite, required if `target_type` is 2, the application must have the `EMBEDDED` flag" } }, "required": [ "max_age", "max_uses", "temporary", "unique", "target_type", "target_user_id", "target_application_id" ] } } }, "required": true } } }, "/channels/{channel_id}/followers": { "post": { "operationId": "postChannelsFollowers", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FollowedChannel" } } }, "description": "OK" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook_channel_id": { "type": "string", "description": "id of target channel" } }, "required": [ "webhook_channel_id" ] } } }, "required": true } } }, "/channels/{channel_id}/typing": { "post": { "operationId": "postChannelsTyping", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Post a typing indicator for the specified channel. Generally bots should **not** implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message. Returns a 204 empty response on success. Fires a Typing Start Gateway event." } } } }, "/channels/{channel_id}/pins": { "get": { "operationId": "getChannelsPins", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Message" } } } }, "description": "Returns all pinned messages in the channel as an array of message objects." } } } }, "/channels/{channel_id}/pins/{message_id}": { "put": { "operationId": "putChannelsPin", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Pin a message in a channel. Requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event.\r" } } }, "delete": { "operationId": "deleteChannelsPin", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } } }, "/channels/{channel_id}/recipients/{user_id}": { "put": { "operationId": "putChannelsRecipient", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Adds a recipient to a Group DM using their access token.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "access_token": { "type": "string", "description": "access token of a user that has granted your app the `gdm.join` scope" }, "nick": { "type": "string", "description": "nickname of the user being added" } }, "required": [ "access_token", "nick" ] } } }, "required": true } }, "delete": { "operationId": "deleteChannelsRecipient", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Removes a recipient from a Group DM." } } } }, "/channels/{channel_id}/messages/{message_id}/threads": { "post": { "operationId": "postChannelsMessagesThreads", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and a Message Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "1-100 character channel name" }, "auto_archive_duration": { "type": "integer", "description": "the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080" }, "rate_limit_per_user": { "type": "integer", "description": "amount of seconds a user has to wait before sending another message (0-21600)" } }, "required": [ "name" ] } } }, "required": true } } }, "/channels/{channel_id}/threads": { "post": { "operationId": "postChannelsThreads", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Creates a new thread in a forum channel, and sends a message within the created thread. Returns a channel, with a nested message object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and Message Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "1-100 character channel name" }, "auto_archive_duration": { "type": "integer", "description": "duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080" }, "rate_limit_per_user": { "type": "integer", "description": "amount of seconds a user has to wait before sending another message (0-21600)" }, "message": { "$ref": "#/components/schemas/ForumThreadMessageParams", "description": "contents of the first message in the forum thread" }, "applied_tags": { "type": "array", "description": "the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` channel", "items": { "type": "string" } } }, "required": [ "name", "message" ] } } }, "required": true } } }, "/channels/{channel_id}/thread-members/@me": { "put": { "operationId": "putChannelsThreadMembersMe", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update and a Thread Create Gateway event." } } }, "delete": { "operationId": "deleteChannelsThreadMembersMe", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event." } } } }, "/channels/{channel_id}/thread-members/{user_id}": { "put": { "operationId": "putChannelsThreadMember", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event." } } }, "delete": { "operationId": "deleteChannelsThreadMember", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Removes another member from a thread. Requires the `MANAGE_THREADS` permission, or the creator of the thread if it is a `PRIVATE_THREAD`. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event." } } }, "get": { "operationId": "getChannelsThreadMember", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadMember" } } }, "description": "Returns a thread member object for the specified user if they are a member of the thread, returns a 404 response otherwise.\r" } } } }, "/channels/{channel_id}/thread-members": { "get": { "operationId": "getChannelsThreadMembers", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ThreadMember" } } } }, "description": "Returns array of thread members objects that are members of the thread.\r" } } } }, "/channels/{channel_id}/threads/archived/public": { "get": { "operationId": "getChannelsThreadsArchivedPublic", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns archived threads in the channel that are public. When called on a `GUILD_TEXT` channel, returns threads of type `PUBLIC_THREAD`. When called on a `GUILD_ANNOUNCEMENT` channel returns threads of type `ANNOUNCEMENT_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission.\r" } } } }, "/channels/{channel_id}/threads/archived/private": { "get": { "operationId": "getChannelsThreadsArchivedPrivate", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Returns archived threads in the channel that are of type `PRIVATE_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires both the `READ_MESSAGE_HISTORY` and `MANAGE_THREADS` permissions.\r" } } } }, "/channels/{channel_id}/users/@me/threads/archived/private": { "get": { "operationId": "getChannelsUsersMeThreadsArchivedPrivate", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Returns archived threads in the channel that are of type `PRIVATE_THREAD`, and the user has joined. Threads are ordered by their `id`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission.\r" } } } }, "/guilds/{guild_id}/emojis": { "get": { "operationId": "getGuildsEmojis", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Emoji" } } } }, "description": "Returns a list of emoji objects for the given guild." } } }, "post": { "operationId": "postGuildsEmojis", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Emoji" } } }, "description": "Create a new emoji for the guild. Requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the emoji" }, "image": { "type": "object", "description": "the 128x128 emoji image" }, "roles": { "type": "array", "description": "roles allowed to use this emoji", "items": { "type": "string" } } }, "required": [ "name", "image", "roles" ] } } }, "required": true } } }, "/guilds/{guild_id}/emojis/{emoji_id}": { "get": { "operationId": "getGuildsEmoji", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Emoji" } } }, "description": "Returns an emoji object for the given guild and emoji IDs." } } }, "patch": { "operationId": "patchGuildsEmoji", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Emoji" } } }, "description": "Modify the given emoji. Requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the emoji" }, "roles": { "type": "array", "description": "roles allowed to use this emoji", "items": { "type": "string" } } }, "required": [ "name", "roles" ] } } }, "required": true } }, "delete": { "operationId": "deleteGuildsEmoji", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete the given emoji. Requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a Guild Emojis Update Gateway event.\r" } } } }, "/guilds": { "post": { "operationId": "postGuilds", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Guild" } } }, "description": "Create a new guild. Returns a guild object on success. Fires a Guild Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the guild (2-100 characters)" }, "region": { "type": "string", "description": "[voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id (deprecated)" }, "icon": { "type": "object", "description": "base64 128x128 image for the guild icon" }, "verification_level": { "type": "integer", "description": "[verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level)" }, "default_message_notifications": { "type": "integer", "description": "default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level)" }, "explicit_content_filter": { "type": "integer", "description": "[explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level)" }, "roles": { "type": "array", "description": "new guild roles", "items": { "$ref": "#/components/schemas/Role" } }, "channels": { "type": "array", "description": "new guild's channels", "items": { "$ref": "#/components/schemas/Channel" } }, "afk_channel_id": { "type": "string", "description": "id for afk channel" }, "afk_timeout": { "type": "integer", "description": "afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600" }, "system_channel_id": { "type": "string", "description": "the id of the channel where guild notices such as welcome messages and boost events are posted" }, "system_channel_flags": { "type": "integer", "description": "[system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags)" } }, "required": [ "name" ] } } }, "required": true } } }, "/guilds/{guild_id}": { "get": { "operationId": "getGuild", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Guild" } } }, "description": "Returns the guild object for the given id. If `with_counts` is set to `true`, this endpoint will also return `approximate_member_count` and `approximate_presence_count` for the guild.\r" } } }, "patch": { "operationId": "patchGuild", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Guild" } } }, "description": "Modify a guild's settings. Requires the `MANAGE_GUILD` permission. Returns the updated guild object on success. Fires a Guild Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "guild name" }, "region": { "type": "string", "description": "guild [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id (deprecated)" }, "verification_level": { "type": "integer", "description": "[verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level)" }, "default_message_notifications": { "type": "integer", "description": "default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level)" }, "explicit_content_filter": { "type": "integer", "description": "[explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level)" }, "afk_channel_id": { "type": "string", "description": "id for afk channel" }, "afk_timeout": { "type": "integer", "description": "afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600" }, "icon": { "type": "object", "description": "base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the `ANIMATED_ICON` feature)" }, "owner_id": { "type": "string", "description": "user id to transfer guild ownership to (must be owner)" }, "splash": { "type": "object", "description": "base64 16:9 png/jpeg image for the guild splash (when the server has the `INVITE_SPLASH` feature)" }, "discovery_splash": { "type": "object", "description": "base64 16:9 png/jpeg image for the guild discovery splash (when the server has the `DISCOVERABLE` feature)" }, "banner": { "type": "object", "description": "base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature)" }, "system_channel_id": { "type": "string", "description": "the id of the channel where guild notices such as welcome messages and boost events are posted" }, "system_channel_flags": { "type": "integer", "description": "[system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags)" }, "rules_channel_id": { "type": "string", "description": "the id of the channel where Community guilds display rules and/or guidelines" }, "public_updates_channel_id": { "type": "string", "description": "the id of the channel where admins and moderators of Community guilds receive notices from Discord" }, "preferred_locale": { "type": "string", "description": "the preferred [locale](#DOCS_REFERENCE/locales) of a Community guild used in server discovery and notices from Discord; defaults to \"en-US\"" }, "features": { "type": "array", "description": "enabled guild features", "items": { "type": "object" } }, "description": { "type": "string", "description": "the description for the guild" }, "premium_progress_bar_enabled": { "type": "boolean", "description": "whether the guild's boost progress bar should be enabled" }, "safety_alerts_channel_id": { "type": "string", "description": "the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord" } }, "required": [ "name", "region", "verification_level", "default_message_notifications", "explicit_content_filter", "afk_channel_id", "afk_timeout", "icon", "owner_id", "splash", "discovery_splash", "banner", "system_channel_id", "system_channel_flags", "rules_channel_id", "public_updates_channel_id", "preferred_locale", "features", "description", "premium_progress_bar_enabled", "safety_alerts_channel_id" ] } } }, "required": true } }, "delete": { "operationId": "deleteGuild", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a guild permanently. User must be owner. Returns `204 No Content` on success. Fires a Guild Delete Gateway event." } } } }, "/guilds/{guild_id}/preview": { "get": { "operationId": "getGuildsPreview", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildPreview" } } }, "description": "Returns the guild preview object for the given id. If the user is not in the guild, then the guild must be lurkable." } } } }, "/guilds/{guild_id}/channels": { "get": { "operationId": "getGuildsChannels", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Channel" } } } }, "description": "Returns a list of guild channel objects. Does not include threads." } } }, "post": { "operationId": "postGuildsChannels", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Create a new channel object for the guild. Requires the `MANAGE_CHANNELS` permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting `MANAGE_ROLES` permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "channel name (1-100 characters)" }, "type": { "type": "integer", "description": "the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types)" }, "topic": { "type": "string", "description": "channel topic (0-1024 characters)" }, "bitrate": { "type": "integer", "description": "the bitrate (in bits) of the voice or stage channel; min 8000" }, "user_limit": { "type": "integer", "description": "the user limit of the voice channel" }, "rate_limit_per_user": { "type": "integer", "description": "amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected" }, "position": { "type": "integer", "description": "sorting position of the channel" }, "permission_overwrites": { "type": "array", "description": "the channel's permission overwrites", "items": { "$ref": "#/components/schemas/Overwrite" } }, "parent_id": { "type": "string", "description": "id of the parent category for a channel" }, "nsfw": { "type": "boolean", "description": "whether the channel is nsfw" }, "rtc_region": { "type": "string", "description": "channel [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id of the voice or stage channel, automatic when set to null" }, "video_quality_mode": { "type": "integer", "description": "the camera [video quality mode](#DOCS_RESOURCES_CHANNEL/channel-object-video-quality-modes) of the voice channel" }, "default_auto_archive_duration": { "type": "integer", "description": "the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity" }, "default_reaction_emoji": { "$ref": "#/components/schemas/DefaultReaction", "description": "emoji to show in the add reaction button on a thread in a `GUILD_FORUM` channel" }, "available_tags": { "type": "array", "description": "set of tags that can be used in a `GUILD_FORUM` channel", "items": { "$ref": "#/components/schemas/ForumTag" } }, "default_sort_order": { "type": "integer", "description": "the [default sort order type](#DOCS_RESOURCES_CHANNEL/channel-object-sort-order-types) used to order posts in `GUILD_FORUM` channels" } }, "required": [ "name", "type", "topic", "bitrate", "user_limit", "rate_limit_per_user", "position", "permission_overwrites", "parent_id", "nsfw", "rtc_region", "video_quality_mode", "default_auto_archive_duration", "default_reaction_emoji", "available_tags", "default_sort_order" ] } } }, "required": true } }, "patch": { "operationId": "patchGuildsChannels", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Modify the positions of a set of channel objects for the guild. Requires `MANAGE_CHANNELS` permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "channel id" }, "position": { "type": "integer", "description": "sorting position of the channel" }, "lock_permissions": { "type": "boolean", "description": "syncs the permission overwrites with the new parent, if moving to a new category" }, "parent_id": { "type": "string", "description": "the new parent ID for the channel that is moved" } }, "required": [ "id", "position", "lock_permissions", "parent_id" ] } } }, "required": true } } }, "/guilds/{guild_id}/threads/active": { "get": { "operationId": "getGuildsThreadsActive", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns all active threads in the guild, including public and private threads. Threads are ordered by their `id`, in descending order.\r" } } } }, "/guilds/{guild_id}/members/{user_id}": { "get": { "operationId": "getGuildsMember", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildMember" } } }, "description": "Returns a guild member object for the specified user." } } }, "put": { "operationId": "putGuildsMember", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildMember" } } }, "description": "Adds a user to the guild, provided you have a valid oauth2 access token for the user with the `guilds.join` scope. Returns a 201 Created with the guild member as the body, or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "access_token": { "type": "string", "description": "an oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild" }, "nick": { "type": "string", "description": "value to set user's nickname to" }, "roles": { "type": "array", "description": "array of role ids the member is assigned", "items": { "type": "string" } }, "mute": { "type": "boolean", "description": "whether the user is muted in voice channels" }, "deaf": { "type": "boolean", "description": "whether the user is deafened in voice channels" } }, "required": [ "access_token", "nick", "roles", "mute", "deaf" ] } } }, "required": true } }, "patch": { "operationId": "patchGuildsMember", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildMember" } } }, "description": "Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the `channel_id` is set to null, this will force the target user to be disconnected from voice.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "nick": { "type": "string", "description": "value to set user's nickname to" }, "roles": { "type": "array", "description": "array of role ids the member is assigned", "items": { "type": "string" } }, "mute": { "type": "boolean", "description": "whether the user is muted in voice channels. Will throw a 400 error if the user is not in a voice channel" }, "deaf": { "type": "boolean", "description": "whether the user is deafened in voice channels. Will throw a 400 error if the user is not in a voice channel" }, "channel_id": { "type": "string", "description": "id of channel to move user to (if they are connected to voice)" }, "communication_disabled_until": { "type": "string", "description": "when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Will throw a 403 error if the user has the ADMINISTRATOR permission or is the owner of the guild", "format": "date-time" }, "flags": { "type": "integer", "description": "[guild member flags](#DOCS_RESOURCES_GUILD/guild-member-object-guild-member-flags)" } }, "required": [ "nick", "roles", "mute", "deaf", "channel_id", "communication_disabled_until", "flags" ] } } }, "required": true } }, "delete": { "operationId": "deleteGuildsMember", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Remove a member from a guild. Requires `KICK_MEMBERS` permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event.\r" } } } }, "/guilds/{guild_id}/members": { "get": { "operationId": "getGuildsMembers", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GuildMember" } } } }, "description": "Returns a list of guild member objects that are members of the guild.\r" } } } }, "/guilds/{guild_id}/members/search": { "get": { "operationId": "getGuildsMembersSearch", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GuildMember" } } } }, "description": "Returns a list of guild member objects whose username or nickname starts with a provided string.\r" } } } }, "/guilds/{guild_id}/members/@me": { "patch": { "operationId": "patchGuildsMembersMe", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "nick": { "type": "string", "description": "value to set user's nickname to" } } } } }, "required": true } } }, "/guilds/{guild_id}/members/@me/nick": { "patch": { "operationId": "patchGuildsMembersMeNick", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Modifies the nickname of the current user in a guild. Returns a 200 with the nickname on success. Fires a Guild Member Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "nick": { "type": "string", "description": "value to set user's nickname to" } } } } }, "required": true } } }, "/guilds/{guild_id}/members/{user_id}/roles/{role_id}": { "put": { "operationId": "putGuildsMembersRole", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Adds a role to a guild member. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.\r" } } }, "delete": { "operationId": "deleteGuildsMembersRole", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Removes a role from a guild member. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.\r" } } } }, "/guilds/{guild_id}/bans": { "get": { "operationId": "getGuildsBans", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Ban" } } } }, "description": "Returns a list of ban objects for the users banned from this guild. Requires the `BAN_MEMBERS` permission.\r" } } } }, "/guilds/{guild_id}/bans/{user_id}": { "get": { "operationId": "getGuildsBan", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ban" } } }, "description": "Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the `BAN_MEMBERS` permission." } } }, "put": { "operationId": "putGuildsBan", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the `BAN_MEMBERS` permission. Returns a 204 empty response on success. Fires a Guild Ban Add Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "delete_message_days": { "type": "integer", "description": "number of days to delete messages for (0-7) (deprecated)" }, "delete_message_seconds": { "type": "integer", "description": "number of seconds to delete messages for, between 0 and 604800 (7 days)" } } } } }, "required": true } }, "delete": { "operationId": "deleteGuildsBan", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Remove the ban for a user. Requires the `BAN_MEMBERS` permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event.\r" } } } }, "/guilds/{guild_id}/roles": { "get": { "operationId": "getGuildsRoles", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Role" } } } }, "description": "Returns a list of role objects for the guild." } } }, "post": { "operationId": "postGuildsRoles", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Role" } } }, "description": "Create a new role for the guild. Requires the `MANAGE_ROLES` permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the role, max 100 characters" }, "permissions": { "type": "string", "description": "bitwise value of the enabled/disabled permissions" }, "color": { "type": "integer", "description": "RGB color value" }, "hoist": { "type": "boolean", "description": "whether the role should be displayed separately in the sidebar" }, "icon": { "type": "object", "description": "the role's icon image (if the guild has the `ROLE_ICONS` feature)" }, "unicode_emoji": { "type": "string", "description": "the role's unicode emoji as a [standard emoji](#DOCS_REFERENCE/message-formatting) (if the guild has the `ROLE_ICONS` feature)" }, "mentionable": { "type": "boolean", "description": "whether the role should be mentionable" } }, "required": [ "name", "permissions", "color", "hoist", "icon", "unicode_emoji", "mentionable" ] } } }, "required": true } }, "patch": { "operationId": "patchGuildsRoles", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Modify the positions of a set of role objects for the guild. Requires the `MANAGE_ROLES` permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "role" }, "position": { "type": "integer", "description": "sorting position of the role" } }, "required": [ "id" ] } } }, "required": true } } }, "/guilds/{guild_id}/roles/{role_id}": { "patch": { "operationId": "patchGuildsRole", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Role" } } }, "description": "Modify a guild role. Requires the `MANAGE_ROLES` permission. Returns the updated role on success. Fires a Guild Role Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the role, max 100 characters" }, "permissions": { "type": "string", "description": "bitwise value of the enabled/disabled permissions" }, "color": { "type": "integer", "description": "RGB color value" }, "hoist": { "type": "boolean", "description": "whether the role should be displayed separately in the sidebar" }, "icon": { "type": "object", "description": "the role's icon image (if the guild has the `ROLE_ICONS` feature)" }, "unicode_emoji": { "type": "string", "description": "the role's unicode emoji as a [standard emoji](#DOCS_REFERENCE/message-formatting) (if the guild has the `ROLE_ICONS` feature)" }, "mentionable": { "type": "boolean", "description": "whether the role should be mentionable" } }, "required": [ "name", "permissions", "color", "hoist", "icon", "unicode_emoji", "mentionable" ] } } }, "required": true } }, "delete": { "operationId": "deleteGuildsRole", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a guild role. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event.\r" } } } }, "/guilds/{guild_id}/mfa": { "post": { "operationId": "postGuildsMfa", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "level": { "type": "integer" } } } } }, "description": "Modify a guild's MFA level. Requires guild ownership. Returns the updated level on success. Fires a Guild Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "level": { "type": "integer", "description": "[MFA level](#DOCS_RESOURCES_GUILD/guild-object-mfa-level)" } }, "required": [ "level" ] } } }, "required": true } } }, "/guilds/{guild_id}/prune": { "get": { "operationId": "getGuildsPrune", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns an object with one `pruned` key indicating the number of members that would be removed in a prune operation. Requires the `KICK_MEMBERS` permission.\r" } } }, "post": { "operationId": "postGuildsPrune", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Begin a prune operation. Requires the `KICK_MEMBERS` permission. Returns an object with one `pruned` key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the `compute_prune_count` option to `false`, forcing `pruned` to `null`. Fires multiple Guild Member Remove Gateway events.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "days": { "type": "integer", "description": "number of days to prune (1-30)" }, "compute_prune_count": { "type": "boolean", "description": "whether `pruned` is returned, discouraged for large guilds" }, "include_roles": { "type": "array", "description": "role(s) to include", "items": { "type": "string" } }, "reason": { "type": "string", "description": "reason for the prune (deprecated)" } }, "required": [ "days", "compute_prune_count", "include_roles" ] } } }, "required": true } } }, "/guilds/{guild_id}/regions": { "get": { "operationId": "getGuildsRegions", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceRegion" } } } }, "description": "Returns a list of voice region objects for the guild. Unlike the similar `/voice` route, this returns VIP servers when the guild is VIP-enabled." } } } }, "/guilds/{guild_id}/invites": { "get": { "operationId": "getGuildsInvites", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Invite" } } } }, "description": "Returns a list of invite objects (with invite metadata) for the guild. Requires the `MANAGE_GUILD` permission." } } } }, "/guilds/{guild_id}/integrations": { "get": { "operationId": "getGuildsIntegrations", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Integration" } } } }, "description": "Returns a list of integration objects for the guild. Requires the `MANAGE_GUILD` permission.\r" } } } }, "/guilds/{guild_id}/integrations/{integration_id}": { "delete": { "operationId": "deleteGuildsIntegration", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "integration_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the `MANAGE_GUILD` permission. Returns a 204 empty response on success. Fires Guild Integrations Update and Integration Delete Gateway events.\r" } } } }, "/guilds/{guild_id}/widget": { "get": { "operationId": "getGuildsWidget", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildWidgetSettings" } } }, "description": "Returns a guild widget settings object. Requires the `MANAGE_GUILD` permission." } } }, "patch": { "operationId": "patchGuildsWidget", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildWidgetSettings" } } }, "description": "Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the `MANAGE_GUILD` permission. Returns the updated guild widget object.\r" } } } }, "/guilds/{guild_id}/widget.json": { "get": { "operationId": "getGuildsWidgetJson", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildWidget" } } }, "description": "Returns the widget for the guild." } } } }, "/guilds/{guild_id}/vanity-url": { "get": { "operationId": "getGuildsVanityUrl", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invite" } } }, "description": "Returns a partial invite object for guilds with that feature enabled. Requires the `MANAGE_GUILD` permission. `code` will be null if a vanity url for the guild is not set.\r" } } } }, "/guilds/{guild_id}/widget.png": { "get": { "operationId": "getGuildsWidgetPng", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns a PNG image widget for the guild. Requires no permissions or authentication.\r" } } } }, "/guilds/{guild_id}/welcome-screen": { "get": { "operationId": "getGuildsWelcomeScreen", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WelcomeScreen" } } }, "description": "Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the `MANAGE_GUILD` permission is required." } } }, "patch": { "operationId": "patchGuildsWelcomeScreen", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WelcomeScreen" } } }, "description": "Modify the guild's Welcome Screen. Requires the `MANAGE_GUILD` permission. Returns the updated Welcome Screen object. May fire a Guild Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "whether the welcome screen is enabled" }, "welcome_channels": { "type": "array", "description": "channels linked in the welcome screen and their display options", "items": { "type": "object" } }, "description": { "type": "string", "description": "the server description to show in the welcome screen" } }, "required": [ "enabled", "welcome_channels", "description" ] } } }, "required": true } } }, "/guilds/{guild_id}/onboarding": { "get": { "operationId": "getGuildsOnboarding", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildOnboarding" } } }, "description": "Returns the Onboarding object for the guild." } } } }, "/guilds/{guild_id}/voice-states/@me": { "patch": { "operationId": "patchGuildsVoiceStatesMe", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Updates the current user's voice state. Returns `204 No Content` on success. Fires a Voice State Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "the id of the channel the user is currently in" }, "suppress": { "type": "boolean", "description": "toggles the user's suppress state" }, "request_to_speak_timestamp": { "type": "string", "description": "sets the user's request to speak", "format": "date-time" } } } } }, "required": true } } }, "/guilds/{guild_id}/voice-states/{user_id}": { "patch": { "operationId": "patchGuildsVoiceState", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Updates another user's voice state. Fires a Voice State Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "the id of the channel the user is currently in" }, "suppress": { "type": "boolean", "description": "toggles the user's suppress state" } }, "required": [ "channel_id" ] } } }, "required": true } } }, "/guilds/{guild_id}/scheduled-events": { "get": { "operationId": "getGuildsScheduledEvents", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GuildScheduledEvent" } } } }, "description": "Returns a list of guild scheduled event objects for the given guild.\r" } } }, "post": { "operationId": "postGuildsScheduledEvents", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildScheduledEvent" } } }, "description": "Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. Fires a Guild Scheduled Event Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "the channel id of the scheduled event." }, "entity_metadata": { "type": "object", "description": "the entity metadata of the scheduled event" }, "name": { "type": "string", "description": "the name of the scheduled event" }, "privacy_level": { "type": "object", "description": "the privacy level of the scheduled event" }, "scheduled_start_time": { "type": "string", "description": "the time to schedule the scheduled event", "format": "date-time" }, "scheduled_end_time": { "type": "string", "description": "the time when the scheduled event is scheduled to end", "format": "date-time" }, "description": { "type": "string", "description": "the description of the scheduled event" }, "entity_type": { "type": "object", "description": "the entity type of the scheduled event" }, "image": { "type": "object", "description": "the cover image of the scheduled event" } }, "required": [ "name", "privacy_level", "scheduled_start_time", "entity_type" ] } } }, "required": true } } }, "/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}": { "get": { "operationId": "getGuildsScheduledEvent", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_scheduled_event_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildScheduledEvent" } } }, "description": "Get a guild scheduled event. Returns a guild scheduled event object on success.\r" } } }, "patch": { "operationId": "patchGuildsScheduledEvent", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_scheduled_event_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildScheduledEvent" } } }, "description": "Modify a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "the channel id of the scheduled event, set to `null` if changing entity type to `EXTERNAL`" }, "entity_metadata": { "type": "object", "description": "the entity metadata of the scheduled event" }, "name": { "type": "string", "description": "the name of the scheduled event" }, "privacy_level": { "type": "object", "description": "the privacy level of the scheduled event" }, "scheduled_start_time": { "type": "string", "description": "the time to schedule the scheduled event", "format": "date-time" }, "scheduled_end_time": { "type": "string", "description": "the time when the scheduled event is scheduled to end", "format": "date-time" }, "description": { "type": "string", "description": "the description of the scheduled event" }, "entity_type": { "type": "object", "description": "the entity type of the scheduled event" }, "status": { "type": "object", "description": "the status of the scheduled event" }, "image": { "type": "object", "description": "the cover image of the scheduled event" } } } } }, "required": true } }, "delete": { "operationId": "deleteGuildsScheduledEvent", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_scheduled_event_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a guild scheduled event. Returns a `204` on success. Fires a Guild Scheduled Event Delete Gateway event." } } } }, "/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users": { "get": { "operationId": "getGuildsScheduledEventsUsers", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_scheduled_event_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GuildScheduledEventUser" } } } }, "description": "Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the `with_member` query parameter is set.\r" } } } }, "/guilds/templates/{template_code}": { "get": { "operationId": "getGuildsTemplatesTemplateCode", "parameters": [ { "name": "template_code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildTemplate" } } }, "description": "Returns a guild template object for the given code." } } }, "post": { "operationId": "postGuildsTemplatesTemplateCode", "parameters": [ { "name": "template_code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Guild" } } }, "description": "Create a new guild based on a template. Returns a guild object on success. Fires a Guild Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the guild (2-100 characters)" }, "icon": { "type": "object", "description": "base64 128x128 image for the guild icon" } }, "required": [ "name" ] } } }, "required": true } } }, "/guilds/{guild_id}/templates": { "get": { "operationId": "getGuildsTemplates", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GuildTemplate" } } } }, "description": "Returns an array of guild template objects. Requires the `MANAGE_GUILD` permission." } } }, "post": { "operationId": "postGuildsTemplates", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildTemplate" } } }, "description": "Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Returns the created guild template object on success.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the template (1-100 characters)" }, "description": { "type": "string", "description": "description for the template (0-120 characters)" } }, "required": [ "name" ] } } }, "required": true } } }, "/guilds/{guild_id}/templates/{template_code}": { "put": { "operationId": "putGuildsTemplatesTemplateCode", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "template_code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildTemplate" } } }, "description": "OK" } } }, "patch": { "operationId": "patchGuildsTemplatesTemplateCode", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "template_code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildTemplate" } } }, "description": "Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Returns the guild template object on success.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the template (1-100 characters)" }, "description": { "type": "string", "description": "description for the template (0-120 characters)" } } } } }, "required": true } }, "delete": { "operationId": "deleteGuildsTemplatesTemplateCode", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "template_code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildTemplate" } } }, "description": "Deletes the template. Requires the `MANAGE_GUILD` permission. Returns the deleted guild template object on success." } } } }, "/invites/{invite_code}": { "get": { "operationId": "getInvitesInviteCode", "parameters": [ { "name": "invite_code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invite" } } }, "description": "Returns an invite object for the given code.\r" } } }, "delete": { "operationId": "deleteInvitesInviteCode", "parameters": [ { "name": "invite_code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invite" } } }, "description": "Delete an invite. Requires the `MANAGE_CHANNELS` permission on the channel this invite belongs to, or `MANAGE_GUILD` to remove any invite across the guild. Returns an invite object on success. Fires an Invite Delete Gateway event.\r" } } } }, "/stage-instances": { "post": { "operationId": "postStageInstances", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StageInstance" } } }, "description": "Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. Fires a Stage Instance Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channel_id": { "type": "string", "description": "The id of the Stage channel" }, "topic": { "type": "string", "description": "The topic of the Stage instance (1-120 characters)" }, "privacy_level": { "type": "integer", "description": "The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance (default GUILD_ONLY)" }, "send_start_notification": { "type": "boolean", "description": "Notify @everyone that a Stage instance has started" } }, "required": [ "channel_id", "topic" ] } } }, "required": true } } }, "/stage-instances/{channel_id}": { "get": { "operationId": "getStageInstance", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Gets the stage instance associated with the Stage channel, if it exists." } } }, "patch": { "operationId": "patchStageInstance", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StageInstance" } } }, "description": "Updates fields of an existing Stage instance. Returns the updated Stage instance. Fires a Stage Instance Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "topic": { "type": "string", "description": "The topic of the Stage instance (1-120 characters)" }, "privacy_level": { "type": "integer", "description": "The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance" } } } } }, "required": true } }, "delete": { "operationId": "deleteStageInstance", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Deletes the Stage instance. Returns `204 No Content`. Fires a Stage Instance Delete Gateway event.\r" } } } }, "/stickers/{sticker_id}": { "get": { "operationId": "getSticker", "parameters": [ { "name": "sticker_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Sticker" } } }, "description": "Returns a sticker object for the given sticker ID." } } } }, "/sticker-packs": { "get": { "operationId": "getStickerPacks", "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns the list of sticker packs available to Nitro subscribers.\r" } } } }, "/guilds/{guild_id}/stickers": { "get": { "operationId": "getGuildsStickers", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Sticker" } } } }, "description": "Returns an array of sticker objects for the given guild. Includes `user` fields if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission." } } }, "post": { "operationId": "postGuildsStickers", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Sticker" } } }, "description": "Create a new sticker for the guild. Send a `multipart/form-data` body. Requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the sticker (2-30 characters)" }, "description": { "type": "string", "description": "description of the sticker (empty or 2-100 characters)" }, "tags": { "type": "string", "description": "autocomplete/suggestion tags for the sticker (max 200 characters)" } }, "required": [ "name", "description", "tags", "file" ] } } }, "required": true } } }, "/guilds/{guild_id}/stickers/{sticker_id}": { "get": { "operationId": "getGuildsSticker", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sticker_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Sticker" } } }, "description": "Returns a sticker object for the given guild and sticker IDs. Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission." } } }, "patch": { "operationId": "patchGuildsSticker", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sticker_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Sticker" } } }, "description": "Modify the given sticker. Requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the sticker (2-30 characters)" }, "description": { "type": "string", "description": "description of the sticker (2-100 characters)" }, "tags": { "type": "string", "description": "autocomplete/suggestion tags for the sticker (max 200 characters)" } }, "required": [ "name", "description", "tags" ] } } }, "required": true } }, "delete": { "operationId": "deleteGuildsSticker", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sticker_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete the given sticker. Requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a Guild Stickers Update Gateway event.\r" } } } }, "/users/@me": { "get": { "operationId": "getUsersMe", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "description": "Returns the user object of the requester's account. For OAuth2, this requires the `identify` scope, which will return the object _without_ an email, and optionally the `email` scope, which returns the object _with_ an email." } } }, "patch": { "operationId": "patchUsersMe", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "description": "Modify the requester's user account settings. Returns a user object on success. Fires a User Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "username": { "type": "string", "description": "user's username, if changed may cause the user's discriminator to be randomized." }, "avatar": { "type": "object", "description": "if passed, modifies the user's avatar" } }, "required": [ "username", "avatar" ] } } }, "required": true } } }, "/users/{user_id}": { "get": { "operationId": "getUser", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "description": "Returns a user object for a given user ID." } } } }, "/users/@me/guilds": { "get": { "operationId": "getUsersMeGuilds", "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Guild" } } } }, "description": "Returns a list of partial guild objects the current user is a member of. Requires the `guilds` OAuth2 scope.\r" } } } }, "/users/@me/guilds/{guild_id}/member": { "get": { "operationId": "getUsersMeGuildsMember", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildMember" } } }, "description": "Returns a guild member object for the current user. Requires the `guilds.members.read` OAuth2 scope." } } } }, "/users/@me/guilds/{guild_id}": { "delete": { "operationId": "deleteUsersMeGuild", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } } }, "/users/@me/channels": { "post": { "operationId": "postUsersMeChannels", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. Fires a Channel Create Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "access_tokens": { "type": "array", "description": "access tokens of users that have granted your app the `gdm.join` scope", "items": { "type": "string" } }, "nicks": { "type": "array", "description": "a dictionary of user ids to their respective nicknames", "items": { "type": "string" } } }, "required": [ "access_tokens", "nicks" ] } } }, "required": true } } }, "/users/@me/connections": { "get": { "operationId": "getUsersMeConnections", "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Connection" } } } }, "description": "Returns a list of connection objects. Requires the `connections` OAuth2 scope." } } } }, "/users/@me/applications/{application_id}/role-connection": { "get": { "operationId": "getUsersMeApplicationsRoleConnection", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationRoleConnection" } } }, "description": "Returns the application role connection for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path." } } }, "put": { "operationId": "putUsersMeApplicationsRoleConnection", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Updates and returns the application role connection for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "platform_name": { "type": "string", "description": "the vanity name of the platform a bot has connected (max 50 characters)" }, "platform_username": { "type": "string", "description": "the username on the platform a bot has connected (max 100 characters)" }, "metadata": { "type": "object", "description": "object mapping [application role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected" } } } } }, "required": true } } }, "/voice/regions": { "get": { "operationId": "getVoiceRegions", "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceRegion" } } } }, "description": "Returns an array of voice region objects that can be used when setting a voice or stage channel's `rtc_region`." } } } }, "/channels/{channel_id}/webhooks": { "post": { "operationId": "postChannelsWebhooks", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Creates a new webhook and returns a webhook object on success. Requires the `MANAGE_WEBHOOKS` permission. Fires a Webhooks Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the webhook (1-80 characters)" }, "avatar": { "type": "object", "description": "image for the default webhook avatar" } }, "required": [ "name" ] } } }, "required": true } }, "get": { "operationId": "getChannelsWebhooks", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Webhook" } } } }, "description": "Returns a list of channel webhook objects. Requires the `MANAGE_WEBHOOKS` permission." } } } }, "/guilds/{guild_id}/webhooks": { "get": { "operationId": "getGuildsWebhooks", "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Webhook" } } } }, "description": "Returns a list of guild webhook objects. Requires the `MANAGE_WEBHOOKS` permission." } } } }, "/webhooks/{webhook_id}": { "get": { "operationId": "getWebhook", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Webhook" } } }, "description": "Returns the new webhook object for the given id." } } }, "patch": { "operationId": "patchWebhook", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Webhook" } } }, "description": "Modify a webhook. Requires the `MANAGE_WEBHOOKS` permission. Returns the updated webhook object on success. Fires a Webhooks Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "the default name of the webhook" }, "avatar": { "type": "object", "description": "image for the default webhook avatar" }, "channel_id": { "type": "string", "description": "the new channel id this webhook should be moved to" } }, "required": [ "name", "avatar", "channel_id" ] } } }, "required": true } }, "delete": { "operationId": "deleteWebhook", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a webhook permanently. Requires the `MANAGE_WEBHOOKS` permission. Returns a `204 No Content` response on success. Fires a Webhooks Update Gateway event.\r" } } } }, "/webhooks/{webhook_id}/{webhook_token}": { "get": { "operationId": "getWebhooksWebhookToken", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhook_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } }, "patch": { "operationId": "patchWebhooksWebhookToken", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhook_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } }, "delete": { "operationId": "deleteWebhooksWebhookToken", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhook_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } }, "post": { "operationId": "postWebhooksWebhookToken", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhook_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string", "description": "the message contents (up to 2000 characters)" }, "username": { "type": "string", "description": "override the default username of the webhook" }, "avatar_url": { "type": "string", "description": "override the default avatar of the webhook" }, "tts": { "type": "boolean", "description": "true if this is a TTS message" }, "embeds": { "type": "array", "description": "embedded `rich` content", "items": { "$ref": "#/components/schemas/Embed" } }, "allowed_mentions": { "$ref": "#/components/schemas/AllowedMentions", "description": "allowed mentions for the message" }, "components": { "type": "array", "description": "the components to include with the message", "items": { "$ref": "#/components/schemas/Component" } }, "payload_json": { "type": "string", "description": "JSON encoded body of non-file params" }, "attachments": { "type": "array", "description": "attachment objects with filename and description", "items": { "$ref": "#/components/schemas/Attachment" } }, "flags": { "type": "integer", "description": "[message flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` can be set)" }, "thread_name": { "type": "string", "description": "name of thread to create (requires the webhook channel to be a forum channel)" } }, "required": [ "content", "username", "avatar_url", "tts", "embeds", "allowed_mentions", "components", "files", "payload_json", "attachments", "flags", "thread_name" ] } } }, "required": true } } }, "/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}": { "get": { "operationId": "getWebhooksWebhookTokenMessage", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhook_token", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } }, "description": "Returns a previously-sent webhook message from the same token. Returns a message object on success.\r" } } }, "patch": { "operationId": "patchWebhooksWebhookTokenMessage", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhook_token", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } }, "description": "Edits a previously-sent webhook message from the same token. Returns a message object on success.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string", "description": "the message contents (up to 2000 characters)" }, "embeds": { "type": "array", "description": "embedded `rich` content", "items": { "$ref": "#/components/schemas/Embed" } }, "allowed_mentions": { "$ref": "#/components/schemas/AllowedMentions", "description": "allowed mentions for the message" }, "components": { "type": "array", "description": "the components to include with the message", "items": { "$ref": "#/components/schemas/Component" } }, "payload_json": { "type": "string", "description": "JSON encoded body of non-file params (multipart/form-data only)" }, "attachments": { "type": "array", "description": "attached files to keep and possible descriptions for new files", "items": { "$ref": "#/components/schemas/Attachment" } } }, "required": [ "content", "embeds", "allowed_mentions", "components", "files", "payload_json", "attachments" ] } } }, "required": true } }, "delete": { "operationId": "deleteWebhooksWebhookTokenMessage", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhook_token", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Deletes a message that was created by the webhook. Returns a `204 No Content` response on success.\r" } } } }, "/gateway": { "get": { "operationId": "getGateway", "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string" } } } } }, "description": "Returns an object with a valid WSS URL which the app can use when Connecting to the Gateway. Apps should cache this value and only call this endpoint to retrieve a new URL when they are unable to properly establish a connection using the cached one.\r" } } } }, "/gateway/bot": { "get": { "operationId": "getGatewayBot", "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "session_start_limit": { "$ref": "#/components/schemas/SessionStartLimit" }, "shards": { "type": "number" }, "url": { "type": "string" } } } } }, "description": "Returns an object based on the information in Get Gateway, plus additional metadata that can help during the operation of large or sharded bots. Unlike the Get Gateway, this route should not be cached for extended periods of time as the value is not guaranteed to be the same per-call, and changes as the bot joins/leaves guilds.\r" } } } }, "/oauth2/applications/@me": { "get": { "operationId": "getOauth2ApplicationsMe", "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns the bot's application object." } } } }, "/oauth2/@me": { "get": { "operationId": "getOauth2Me", "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns info about the current authorization. Requires authentication with a bearer token.\r" } } } }, "/applications/{application_id}/commands": { "get": { "operationId": "getApplicationsCommands", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationCommand" } } } }, "description": "OK" } } }, "post": { "operationId": "postApplicationsCommands", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Create a new global command. Returns `201` if a command with the same name does not already exist, or a `200` if it does (in which case the previous command will be overwritten). Both responses include an application command object.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "[Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters" }, "name_localizations": { "type": "object", "description": "Localization dictionary for the `name` field. Values follow the same restrictions as `name`" }, "description": { "type": "string", "description": "1-100 character description for `CHAT_INPUT` commands" }, "description_localizations": { "type": "object", "description": "Localization dictionary for the `description` field. Values follow the same restrictions as `description`" }, "options": { "type": "array", "description": "the parameters for the command", "items": { "type": "object" } }, "default_member_permissions": { "type": "string", "description": "Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set" }, "dm_permission": { "type": "boolean", "description": "Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible." }, "default_permission": { "type": "boolean", "description": "Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true`" }, "type": { "type": "object", "description": "Type of command, defaults `1` if not set" }, "nsfw": { "type": "boolean", "description": "Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands)" } }, "required": [ "name" ] } } }, "required": true } }, "put": { "operationId": "putApplicationsCommands", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } } }, "/applications/{application_id}/commands/{command_id}": { "get": { "operationId": "getApplicationsCommand", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationCommand" } } }, "description": "OK" } } }, "patch": { "operationId": "patchApplicationsCommand", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Edit a global command. Returns `200` and an application command object. All fields are optional, but any fields provided will entirely overwrite the existing values of those fields.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "[Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters" }, "name_localizations": { "type": "object", "description": "Localization dictionary for the `name` field. Values follow the same restrictions as `name`" }, "description": { "type": "string", "description": "1-100 character description" }, "description_localizations": { "type": "object", "description": "Localization dictionary for the `description` field. Values follow the same restrictions as `description`" }, "options": { "type": "array", "description": "the parameters for the command", "items": { "type": "object" } }, "default_member_permissions": { "type": "string", "description": "Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set" }, "dm_permission": { "type": "boolean", "description": "Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible." }, "default_permission": { "type": "boolean", "description": "Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true`" }, "nsfw": { "type": "boolean", "description": "Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands)" } } } } }, "required": true } }, "delete": { "operationId": "deleteApplicationsCommand", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Deletes a global command. Returns `204 No Content` on success." } } } }, "/applications/{application_id}/guilds/{guild_id}/commands": { "get": { "operationId": "getApplicationsGuildsCommands", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationCommand" } } } }, "description": "OK" } } }, "post": { "operationId": "postApplicationsGuildsCommands", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Create a new guild command. New guild commands will be available in the guild immediately. Returns `201` if a command with the same name does not already exist, or a `200` if it does (in which case the previous command will be overwritten). Both responses include an application command object.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "[Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters" }, "name_localizations": { "type": "object", "description": "Localization dictionary for the `name` field. Values follow the same restrictions as `name`" }, "description": { "type": "string", "description": "1-100 character description for `CHAT_INPUT` commands" }, "description_localizations": { "type": "object", "description": "Localization dictionary for the `description` field. Values follow the same restrictions as `description`" }, "options": { "type": "array", "description": "Parameters for the command", "items": { "type": "object" } }, "default_member_permissions": { "type": "string", "description": "Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set" }, "default_permission": { "type": "boolean", "description": "Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true`" }, "type": { "type": "object", "description": "Type of command, defaults `1` if not set" }, "nsfw": { "type": "boolean", "description": "Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands)" } }, "required": [ "name" ] } } }, "required": true } }, "put": { "operationId": "putApplicationsGuildsCommands", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } } }, "/applications/{application_id}/guilds/{guild_id}/commands/{command_id}": { "get": { "operationId": "getApplicationsGuildsCommand", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationCommand" } } }, "description": "OK" } } }, "patch": { "operationId": "patchApplicationsGuildsCommand", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Edit a guild command. Updates for guild commands will be available immediately. Returns `200` and an application command object. All fields are optional, but any fields provided will entirely overwrite the existing values of those fields.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "[Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters" }, "name_localizations": { "type": "object", "description": "Localization dictionary for the `name` field. Values follow the same restrictions as `name`" }, "description": { "type": "string", "description": "1-100 character description" }, "description_localizations": { "type": "object", "description": "Localization dictionary for the `description` field. Values follow the same restrictions as `description`" }, "options": { "type": "array", "description": "Parameters for the command", "items": { "type": "object" } }, "default_member_permissions": { "type": "string", "description": "Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set" }, "default_permission": { "type": "boolean", "description": "Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true`" }, "nsfw": { "type": "boolean", "description": "Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands)" } } } } }, "required": true } }, "delete": { "operationId": "deleteApplicationsGuildsCommand", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Delete a guild command. Returns `204 No Content` on success." } } } }, "/applications/{application_id}/guilds/{guild_id}/commands/permissions": { "get": { "operationId": "getApplicationsGuildsCommandsPermissions", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GuildApplicationCommandPermissions" } } } }, "description": "OK" } } }, "put": { "operationId": "putApplicationsGuildsCommandsPermissions", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OK" } } } }, "/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions": { "get": { "operationId": "getApplicationsGuildsCommandPermissions", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GuildApplicationCommandPermissions" } } }, "description": "OK" } } }, "put": { "operationId": "putApplicationsGuildsCommandPermissions", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "guild_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "command_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Edits command permissions for a specific command for your application in a guild and returns a guild application command permissions object. Fires an Application Command Permissions Update Gateway event.\r" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "permissions": { "type": "array", "description": "Permissions for the command in the guild", "items": { "type": "object" } } }, "required": [ "permissions" ] } } }, "required": true } } }, "/interactions/{interaction_id}/{interaction_token}/callback": { "post": { "operationId": "postInteractionsInteractionTokenCallback", "parameters": [ { "name": "interaction_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Create a response to an Interaction from the gateway. Body is an interaction response. Returns `204 No Content`.\r" } } } }, "/webhooks/{application_id}/{interaction_token}/messages/@original": { "get": { "operationId": "getWebhooksInteractionTokenMessagesOriginal", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns the initial Interaction response. Functions the same as Get Webhook Message." } } }, "patch": { "operationId": "patchWebhooksInteractionTokenMessagesOriginal", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Edits the initial Interaction response. Functions the same as Edit Webhook Message." } } }, "delete": { "operationId": "deleteWebhooksInteractionTokenMessagesOriginal", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Deletes the initial Interaction response. Returns `204 No Content` on success." } } } }, "/webhooks/{application_id}/{interaction_token}": { "post": { "operationId": "postWebhooksInteractionToken", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Create a followup message for an Interaction. Functions the same as Execute Webhook, but `wait` is always true. The `thread_id`, `avatar_url`, and `username` parameters are not supported when using this endpoint for interaction followups.\r" } } } }, "/webhooks/{application_id}/{interaction_token}/messages/{message_id}": { "get": { "operationId": "getWebhooksInteractionTokenMessage", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Returns a followup message for an Interaction. Functions the same as Get Webhook Message." } } }, "patch": { "operationId": "patchWebhooksInteractionTokenMessage", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Edits a followup message for an Interaction. Functions the same as Edit Webhook Message." } } }, "delete": { "operationId": "deleteWebhooksInteractionTokenMessage", "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "interaction_token", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "Deletes a followup message for an Interaction. Returns `204 No Content` on success." } } } } }, "servers": [ { "url": "https://discord.com/api/v10" } ] }