├── .github └── workflows │ └── ci.yml ├── docs ├── account_verification.md ├── affinities.md ├── bulk_member_role.md ├── capabilities.md ├── create_guild.md ├── dms.md ├── gateway_events.md ├── gateway_opcodes.md ├── get_role_members.md ├── guild_avatars.md ├── guild_directories.md ├── guild_discovery.md ├── guild_lurking.md ├── index.md ├── join_leave_guild.md ├── manage_discovery_partnership.md ├── member_verification.md ├── modify_guild.md ├── notes.md ├── profile.md ├── ready_event.md ├── ready_supplemental.md ├── relationships.md ├── remote_auth.md ├── role_member_counts.md ├── search.md ├── slash_commands.md ├── stylesheets │ └── extra.css ├── threads.md ├── update_guild_mfa_level.md ├── user_guild_settings.md ├── voice_channel_effects.md ├── voice_gateway_opcodes.md └── welcome_screen.md └── mkdocs.yml /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | on: 3 | push: 4 | branches: 5 | - master 6 | - main 7 | permissions: 8 | contents: write 9 | jobs: 10 | deploy: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - uses: actions/setup-python@v4 15 | with: 16 | python-version: 3.x 17 | - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV 18 | - uses: actions/cache@v3 19 | with: 20 | key: mkdocs-material-${{ env.cache_id }} 21 | path: .cache 22 | restore-keys: | 23 | mkdocs-material- 24 | - run: pip install mkdocs-material pymdown-extensions 25 | - run: mkdocs gh-deploy --force 26 | -------------------------------------------------------------------------------- /docs/account_verification.md: -------------------------------------------------------------------------------- 1 | # Account Verification 2 | 3 | When Discord thinks you might be a spammer or doing something naughty it will send `USER_REQUIRED_ACTION_UPDATE` as described below 4 | 5 | ### User Required Action Update Dispatch Event 6 | 7 | | Field | Type | Description | 8 | |-----------------|--------|------------------------------------| 9 | | required_action | string | type of required action. see below | 10 | 11 | ### Required Action Type 12 | 13 | | Name | Description | 14 | |------------------------|--------------------------------------| 15 | | REQUIRE_CAPTCHA | user must complete a captcha | 16 | | REQUIRE_VERIFIED_EMAIL | user must verify an email | 17 | | REQUIRE_VERIFIED_PHONE | user must verify with a phone number | 18 | 19 | ### Send Phone Verification Code 20 | 21 | **POST** `/users/@me/phone`
22 | Returns 204 No Content on success 23 | JSON parameters: 24 | 25 | | Field | Type | Description | 26 | |-------|--------|--------------------------------------| 27 | | phone | string | phone number in format "+1234567890" | 28 | 29 | Errors: 30 | 31 | | Error | Description | 32 | |-------|----------------------| 33 | | 50022 | Invalid phone number | 34 | 35 | ### Verify Phone with Code 36 | 37 | **POST** `/phone-verifications/verify`
38 | Returns 400 Bad Request on bad code or 200 OK on success
39 | JSON parameters: 40 | 41 | | Field | Type | Description | 42 | |-------|--------|--------------------------------------| 43 | | code | string | the verification code | 44 | | phone | string | phone number in format "+1234567890" | 45 | 46 | Return object: 47 | 48 | | Field | Type | Description | 49 | |-------|--------|-------------------------------------| 50 | | token | string | token used to finalize verification | 51 | 52 | ### Finalize Phone Verification 53 | 54 | **POST** `/users/@me/phone`
55 | Returns 204 No Content on success
56 | JSON parameters: 57 | 58 | | Field | Type | Description | 59 | |-------------|--------|-----------------------------------------------------------------------| 60 | | password | string | account password | 61 | | phone_token | string | token received from [Verify Phone with Code](#verify-phone-with-code) | 62 | -------------------------------------------------------------------------------- /docs/affinities.md: -------------------------------------------------------------------------------- 1 | # Affinities 2 | 3 | As of June 2023, these endpoints appear to return the below objects, but with no data. 4 | 5 | ## User Affinities 6 | 7 | Unknown. Presumably values indicating who the user communicates with most
8 | 9 | ### Get User Affinities 10 | 11 | **GET** `/users/@me/affinities/users`
12 | 13 | Returns: 14 | 15 | | Field | Type | Description | 16 | |-------------------------|---------------------------------------------------------|-------------------------| 17 | | user_affinities | array of [user affinity](#user-affinity-object) objects | list of user affinities | 18 | | inverse_user_affinities | unknown | unknown | 19 | 20 | ### User Affinity Object 21 | 22 | | Field | Type | Description | 23 | |----------|----------------|--------------------------| 24 | | user_id | snowflake | the id of the user | 25 | | affinity | decimal number | the affinity of the user | 26 | 27 | ## Guild Affinities 28 | 29 | Unknown. Presumably values indicating what guilds the user communicates in the most
30 | 31 | ### Get Guild Affinities 32 | 33 | **GET** `/users/@me/affinities/guilds`
34 | 35 | Returns: 36 | 37 | | Field | Type | Description | 38 | |------------------|-----------------------------------------------------------|--------------------------| 39 | | guild_affinities | array of [guild affinity](#guild-affinity-object) objects | list of guild affinities | 40 | 41 | ### Guild Affinity Object 42 | 43 | | Field | Type | Description | 44 | |----------|----------------|---------------------------| 45 | | guild_id | snowflake | the id of the guild | 46 | | affinity | decimal number | the affinity of the guild | 47 | -------------------------------------------------------------------------------- /docs/bulk_member_role.md: -------------------------------------------------------------------------------- 1 | # Bulk Add Member Role 2 | 3 | **PATCH** `/guilds/{guild.id}/roles/{role.id}/members`
4 | Assign multiple members a role at once
5 | Returns map from user ids to [member objects](https://discord.com/developers/docs/resources/guild#guild-member-object)
6 | 7 | JSON parameters: 8 | 9 | | Field | Type | Description | 10 | |------------|--------------------|-------------------------------------| 11 | | member_ids | array of snowflake | list of members to give the role to | 12 | -------------------------------------------------------------------------------- /docs/capabilities.md: -------------------------------------------------------------------------------- 1 | # Capabilities 2 | 3 | Capabilities is a field (`capabilities`) within the IDENTIFY payload that communicates what the client is "capable" of. 4 | Unfortunately this means Discord's API does weird things that don't match what the documentation says. 5 | 6 | The following capability names are arbitrary and not taken from Discord since Discord does not name each bit, but hardcodes their value. 7 | 8 | | Key | Value | Description | 9 | |---------------------------------------|---------|----------------------------------------------------------------------------------------------------------------------| 10 | | LAZY_USER_NOTES | 1 << 0 | don't send user notes in `READY` | 11 | | NO_AFFINE_USER_IDS | 1 << 1 | | 12 | | VERSIONED_READ_STATES | 1 << 2 | | 13 | | VERSIONED_USER_GUILD_SETTINGS | 1 << 3 | | 14 | | DEDUPLICATE_USER_OBJECTS | 1 << 4 | | 15 | | PRIORITIZED_READY_PAYLOAD | 1 << 5 | responsible for sending `READY_SUPPLEMENTAL` | 16 | | MULTIPLE_GUILD_EXPERIMENT_POPULATIONS | 1 << 6 | | 17 | | NON_CHANNEL_READ_STATES | 1 << 7 | | 18 | | AUTH_TOKEN_REFRESH | 1 << 8 | | 19 | | USER_SETTINGS_PROTO | 1 << 9 | `user_settings` in the READY message will be omitted | 20 | | CLIENT_STATE_V2 | 1 << 10 | heavily alters the guild object | 21 | | PASSIVE_GUILD_UPDATE | 1 << 11 | causes the gateway to send `PASSIVE_UPDATE_V1` events | 22 | | AUTO_CALL_CONNECT | 1 << 12 | causes the gateway to send `CALL_CONNECT` for active calls at time of connection instead of requiring manual request | | 23 | | DEBOUNCE_MESSAGE_REACTIONS | 1 << 13 | causes gateway to send `MESSAGE_REACTION_ADD_MANY` instead of rapid `MESSAGE_REACTION_ADD` events | 24 | 25 | As of 3 July 2023, Discord uses 16381 which corresponds to all bits except NO_AFFINE_USER_IDS 26 | 27 | ## USER_SETTINGS_PROTO 28 | 29 | Forces usage of the `user_settings_proto` field which uses Google's protobuf instead of the standard `user_settings`. 30 | The reconstructed .proto is available 31 | [here](https://github.com/dolfies/discord-protos/blob/master/discord_protos/PreloadedUserSettings.proto) 32 | 33 | ## CLIENT_STATE_V2 34 | 35 | The following fields of the [guild object](https://discord.com/developers/docs/resources/guild#guild-object-guild-structure) 36 | are moved into a new field called `properties`: 37 | 38 | * `afk_channel_id` 39 | * `afk_timeout` 40 | * `application_id` 41 | * `banner` 42 | * `default_message_notifications` 43 | * `description` 44 | * `discovery_splash` 45 | * `explicit_content_filter` 46 | * `features` 47 | * `guild_hashes` (removed) 48 | * `home_header` 49 | * `hub_type` 50 | * `icon` 51 | * `latest_onboarding_question_id` 52 | * `max_members` 53 | * `max_stage_video_channel_users` 54 | * `max_video_channel_users` 55 | * `mfa_level` 56 | * `name` 57 | * `nsfw` 58 | * `nsfw_level` 59 | * `owner_id` 60 | * `preferred_locale` 61 | * `premium_progress_bar_enabled` 62 | * `premium_tier` 63 | * `public_updates_channel_id` 64 | * `region` (removed) 65 | * `rules_channel_id` 66 | * `safety_alerts_channel_id` 67 | * `splash` 68 | * `system_channel_flags` 69 | * `system_channel_id` 70 | * `vanity_url_code` 71 | * `verification_level` 72 | 73 | The `version` field in channel and other objects within guild are removed. 74 | 75 | The `data_mode` field is added to the guild object. Currently seems to always be "full." 76 | 77 | ## PASSIVE_GUILD_UPDATE 78 | 79 | Causes a `PASSIVE_UPDATE_V1` dispatch event to be sent periodically instead of `CHANNEL_UNREADS_UPDATE` 80 | 81 | ### PASSIVE_UPDATE_V1 object 82 | 83 | | Field | Type | Description | 84 | |--------------|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------| 85 | | voice_states | array of [voice state](https://discord.com/developers/docs/resources/voice#voice-state-object-voice-state-structure) | voice states for users in the guild | 86 | | members | array of [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure) | some of the members | 87 | | guild_id | snowflake | the guild the update is for | 88 | | channels | array of read state entries | read state of the guild | 89 | 90 | ## Unnamed bit 12 91 | 92 | Behavior unknown. Only changed observed so far is `CALL_CREATE` events being fired for calls that are active at time of 93 | connection 94 | 95 | ## Unnamed bit 13 96 | 97 | Causes the gateway to send `MESSAGE_REACTION_ADD_MANY` events. 98 | 99 | ### MESSAGE_REACTION_ADD_MANY object 100 | 101 | | Field | Type | Description | 102 | |------------|---------------------------------------------------------|--------------------------------------| 103 | | guild_id | snowflake | guild the message is in | 104 | | channel_id | snowflake | channel the message is in | 105 | | message_id | snowflake | message reactions are being added to | 106 | | reactions | array of [many reaction](#many-reaction-object) objects | reactions that were added | 107 | 108 | #### many reaction object 109 | 110 | | Field | Type | Description | 111 | |-------|------------------------------------------------------------------------------------------|------------------------------| 112 | | users | array of snowflake | users who added the reaction | 113 | | emoji | partial [emoji](https://discord.com/developers/docs/resources/emoji#emoji-object) object | emoji information | 114 | -------------------------------------------------------------------------------- /docs/create_guild.md: -------------------------------------------------------------------------------- 1 | # Create Guild Extra Parameters 2 | 3 | [Original documentation](https://discord.com/developers/docs/resources/guild#create-guild) 4 | 5 | Extra JSON parameters: 6 | 7 | | Field | Type | Description | 8 | |---------------------|--------|-----------------------------------------| 9 | | guild_template_code | string | template to use when creating the guild | 10 | 11 | ## Guild Template Codes 12 | 13 | | Code | Description | 14 | |--------------|-----------------| 15 | | 2TffvPucqHkN | Blank (CREATE) | 16 | | hvtBQMfw6uSJ | Gaming | 17 | | hgM48av5Q69A | Friends | 18 | | FbwUwRp4j8Es | Study | 19 | | s4WNnBxTDPsY | Clubs | 20 | | 6exdzMgjZgah | Creators | 21 | | 64UDvRNCC52Y | Local Community | 22 | | Ctg7PUHcQmZu | School Club | 23 | -------------------------------------------------------------------------------- /docs/dms.md: -------------------------------------------------------------------------------- 1 | # DMs 2 | 3 | ## Create DM 4 | 5 | **POST** `/users/@me/channels`
6 | Creates a new DM. Even though the official docs suggest a different request for creating a new DM with one user, the official client still uses a 1-element array.
7 | 8 | Returns a [channel object](https://discord.com/developers/docs/resources/channel#channel-object) 9 | 10 | ???+ warning 11 | This endpoint is known to upset Discord's spam filter. Be careful! 12 | 13 | JSON parameters: 14 | 15 | | Field | Type | Description | 16 | |------------|--------------------|-------------------------------------------------| 17 | | recipients | array of snowflake | array of user ids who should be added to the dm | 18 | 19 | ## Close DM 20 | 21 | **DELETE** `/channels/{channel.id}` 22 | 23 | ## Add Group DM Recipient 24 | 25 | **PUT** `/channels/{channel.id}/recipients/{user.id}` 26 | 27 | ## Remove Group DM Recipient 28 | 29 | **DELETE** `/channels/{channel.id}/recipients/{user.id}` 30 | -------------------------------------------------------------------------------- /docs/gateway_events.md: -------------------------------------------------------------------------------- 1 | # Gateway Events 2 | 3 | ???+ warning 4 | This list may not be complete. Some bot-only events are excluded. 5 | 6 | | Event | Documented | 7 | |----------------------------------------------------------------------------------------------------------------------------------|------------| 8 | | ACTIVITY_START | ❌ | 9 | | ACTIVITY_USER_ACTION | ❌ | 10 | | APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE | ❌ | 11 | | APPLICATION_COMMAND_PERMISSIONS_UPDATE | ❌ | 12 | | AUTH_SESSION_CHANGE | ❌ | 13 | | AUTO_MODERATION_MENTION_RAID_DETECTION | ❌ | 14 | | BILLING_POPUP_BRIDGE_CALLBACK | ❌ | 15 | | BILLING_REFERRAL_TRIAL_OFFER_UPDATE | ❌ | 16 | | BURST_CREDIT_BALANCE_UPDATE | ❌ | 17 | | CALL_CREATE | ❌ | 18 | | CALL_DELETE | ❌ | 19 | | CALL_UPDATE | ❌ | 20 | | [CHANNEL_CREATE](https://discord.com/developers/docs/topics/gateway-events#channel-create) | ✅ | 21 | | [CHANNEL_DELETE](https://discord.com/developers/docs/topics/gateway-events#channel-delete) | ✅ | 22 | | CHANNEL_PINS_ACK | ❌ | 23 | | [CHANNEL_PINS_UPDATE](https://discord.com/developers/docs/topics/gateway-events#channel-pins-update) | ✅ | 24 | | CHANNEL_RECIPIENT_ADD | ❌ | 25 | | CHANNEL_RECIPIENT_REMOVE | ❌ | 26 | | [CHANNEL_UPDATE](https://discord.com/developers/docs/topics/gateway-events#channel-update) | ✅ | 27 | | CONSOLE_COMMAND_UPDATE | ❌ | 28 | | CREATOR_MONETIZATION_RESTRICTIONS_UPDATE | ❌ | 29 | | DELETED_ENTITY_IDS | ❌ | 30 | | EMBEDDED_ACTIVITY_UPDATE | ❌ | 31 | | ENTITLEMENT_CREATE | ❌ | 32 | | ENTITLEMENT_DELETE | ❌ | 33 | | ENTITLEMENT_UPDATE | ❌ | 34 | | FORUM_UNREADS | ❌ | 35 | | FRIEND_SUGGESTION_CREATE | ❌ | 36 | | FRIEND_SUGGESTION_DELETE | ❌ | 37 | | GENERIC_PUSH_NOTIFICATION_SENT | ❌ | 38 | | GIFT_CODE_CREATE | ❌ | 39 | | GIFT_CODE_UPDATE | ❌ | 40 | | GUILD_APPLICATION_COMMAND_INDEX_UPDATE | ❌ | 41 | | [GUILD_BAN_ADD](https://discord.com/developers/docs/topics/gateway-events#guild-ban-add) | ✅ | 42 | | [GUILD_BAN_REMOVE](https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove) | ✅ | 43 | | [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) | ✅ | 44 | | [GUILD_DELETE](https://discord.com/developers/docs/topics/gateway-events#guild-delete) | ✅ | 45 | | GUILD_DIRECTORY_ENTRY_CREATE | ❌ | 46 | | GUILD_DIRECTORY_ENTRY_DELETE | ❌ | 47 | | GUILD_DIRECTORY_ENTRY_UPDATE | ❌ | 48 | | [GUILD_EMOJIS_UPDATE](https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update) | ✅ | 49 | | GUILD_FEATURE_ACK | ❌ | 50 | | [GUILD_INTEGRATIONS_UPDATE](https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update) | ✅ | 51 | | [GUILD_JOIN_REQUEST_CREATE](./member_verification.md#guild-join-request-create-dispatch-event) | ❌ | 52 | | [GUILD_JOIN_REQUEST_DELETE](./member_verification.md#guild-join-request-delete-dispatch-event) | ❌ | 53 | | [GUILD_JOIN_REQUEST_UPDATE](./member_verification.md#guild-join-request-update-dispatch-event) | ❌ | 54 | | [GUILD_MEMBER_ADD](https://discord.com/developers/docs/topics/gateway-events#guild-member-add) | ✅ | 55 | | GUILD_MEMBER_LIST_UPDATE | ❌ | 56 | | [GUILD_MEMBER_REMOVE](https://discord.com/developers/docs/topics/gateway-events#guild-member-remove) | ✅ | 57 | | [GUILD_MEMBER_UPDATE](https://discord.com/developers/docs/topics/gateway-events#guild-member-update) | ✅ | 58 | | [GUILD_MEMBERS_CHUNK](https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk) | ✅ | 59 | | [GUILD_ROLE_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-role-create) | ✅ | 60 | | [GUILD_ROLE_DELETE](https://discord.com/developers/docs/topics/gateway-events#guild-role-delete) | ✅ | 61 | | [GUILD_ROLE_UPDATE](https://discord.com/developers/docs/topics/gateway-events#guild-role-update) | ✅ | 62 | | [GUILD_SCHEDULED_EVENT_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create) | ✅ | 63 | | [GUILD_SCHEDULED_EVENT_DELETE](https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-delete) | ✅ | 64 | | [GUILD_SCHEDULED_EVENT_UPDATE](https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-update) | ✅ | 65 | | [GUILD_SCHEDULED_EVENT_USER_ADD](https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-add) | ✅ | 66 | | [GUILD_SCHEDULED_EVENT_USER_REMOVE](https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-user-remove) | ✅ | 67 | | GUILD_SOUNDBOARD_SOUND_CREATE | ❌ | 68 | | GUILD_SOUNDBOARD_SOUND_DELETE | ❌ | 69 | | GUILD_SOUNDBOARD_SOUND_UPDATE | ❌ | 70 | | GUILD_SOUNDBOARD_SOUNDS_UPDATE | ❌ | 71 | | [GUILD_STICKERS_UPDATE](https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update) | ✅ | 72 | | [GUILD_UPDATE](https://discord.com/developers/docs/topics/gateway-events#guild-update) | ✅ | 73 | | [INTEGRATION_CREATE](https://discord.com/developers/docs/topics/gateway-events#integration-create) | ✅ | 74 | | [INTEGRATION_DELETE](https://discord.com/developers/docs/topics/gateway-events#integration-delete) | ✅ | 75 | | [INTERACTION_CREATE](https://discord.com/developers/docs/topics/gateway-events#interaction-create) | ✅ | 76 | | INTERACTION_FAILURE | ❌ | 77 | | INTERACTION_IFRAME_MODAL_CREATE | ❌ | 78 | | INTERACTION_MODAL_CREATE | ❌ | 79 | | INTERACTION_SUCCESS | ❌ | 80 | | LAST_MESSAGES | ❌ | 81 | | LIBRARY_APPLICATION_UPDATE | ❌ | 82 | | LOBBY_CREATE | ❌ | 83 | | LOBBY_DELETE | ❌ | 84 | | LOBBY_MEMBER_CONNECT | ❌ | 85 | | LOBBY_MEMBER_DISCONNECT | ❌ | 86 | | LOBBY_MEMBER_UPDATE | ❌ | 87 | | LOBBY_MESSAGE | ❌ | 88 | | LOBBY_UPDATE | ❌ | 89 | | LOBBY_VOICE_SERVER_UPDATE | ❌ | 90 | | LOBBY_VOICE_STATE_UPDATE | ❌ | 91 | | MESSAGE_ACK | ❌ | 92 | | [MESSAGE_CREATE](https://discord.com/developers/docs/topics/gateway-events#message-create) | ✅ | 93 | | [MESSAGE_DELETE](https://discord.com/developers/docs/topics/gateway-events#message-delete) | ✅ | 94 | | [MESSAGE_DELETE_BULK](https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk) | ✅ | 95 | | [MESSAGE_REACTION_ADD](https://discord.com/developers/docs/topics/gateway-events#message-reaction-add) | ✅ | 96 | | MESSAGE_REACTION_ADD_MANY | ❌ | 97 | | [MESSAGE_REACTION_REMOVE](https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove) | ✅ | 98 | | [MESSAGE_REACTION_REMOVE_ALL](https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all) | ✅ | 99 | | [MESSAGE_REACTION_REMOVE_EMOJI](https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji) | ✅ | 100 | | [MESSAGE_UPDATE](https://discord.com/developers/docs/topics/gateway-events#message-update) | ✅ | 101 | | NOTIFICATION_CENTER_ITEM_COMPLETED | ❌ | 102 | | NOTIFICATION_CENTER_ITEM_CREATE | ❌ | 103 | | NOTIFICATION_CENTER_ITEM_DELETE | ❌ | 104 | | NOTIFICATION_CENTER_ITEMS_ACK | ❌ | 105 | | OAUTH2_TOKEN_REVOKE | ❌ | 106 | | PASSIVE_UPDATE_V1 | ❌ | 107 | | PAYMENT_UPDATE | ❌ | 108 | | [PRESENCE_UPDATE](https://discord.com/developers/docs/topics/gateway-events#presence-update) | ✅ | 109 | | PRESENCES_REPLACE | ❌ | 110 | | PRIVATE_CHANNEL_INTEGRATION_CREATE | ❌ | 111 | | PRIVATE_CHANNEL_INTEGRATION_DELETE | ❌ | 112 | | PRIVATE_CHANNEL_INTEGRATION_UPDATE | ❌ | 113 | | [READY](https://discord.com/developers/docs/topics/gateway-events#ready) | ✅* | 114 | | [READY_SUPPLEMENTAL](./ready_supplemental.md) | ❌ | 115 | | RECENT_MENTION_DELETE | ❌ | 116 | | RELATIONSHIP_ADD | ❌ | 117 | | RELATIONSHIP_REMOVE | ❌ | 118 | | RELATIONSHIP_UPDATE | ❌ | 119 | | RESUMED | ❌ | 120 | | SESSIONS_REPLACE | ❌ | 121 | | SOUNDBOARD_SOUNDS | ❌ | 122 | | SPEED_TEST_CREATE | ❌ | 123 | | SPEED_TEST_DELETE | ❌ | 124 | | SPEED_TEST_SERVER_UPDATE | ❌ | 125 | | SPEED_TEST_UPDATE | ❌ | 126 | | [STAGE_INSTANCE_CREATE](https://discord.com/developers/docs/topics/gateway-events#stage-instance-create) | ✅ | 127 | | [STAGE_INSTANCE_DELETE](https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete) | ✅ | 128 | | [STAGE_INSTANCE_UPDATE](https://discord.com/developers/docs/topics/gateway-events#stage-instance-update) | ✅ | 129 | | STREAM_CREATE | ❌ | 130 | | STREAM_DELETE | ❌ | 131 | | STREAM_SERVER_UPDATE | ❌ | 132 | | STREAM_UPDATE | ❌ | 133 | | [THREAD_CREATE](https://discord.com/developers/docs/topics/gateway-events#thread-create) | ✅ | 134 | | [THREAD_DELETE](https://discord.com/developers/docs/topics/gateway-events#thread-delete) | ✅ | 135 | | [THREAD_LIST_SYNC](https://discord.com/developers/docs/topics/gateway-events#thread-list-sync) | ✅* | 136 | | [THREAD_MEMBER_LIST_UPDATE](./threads.md#thread-member-list-update) | ❌ | 137 | | [THREAD_MEMBER_UPDATE](https://discord.com/developers/docs/topics/gateway-events#thread-member-update) | ✅ | 138 | | [THREAD_MEMBERS_UPDATE](https://discord.com/developers/docs/topics/gateway-events#thread-members-update) | ✅ | 139 | | [THREAD_UPDATE](https://discord.com/developers/docs/topics/gateway-events#thread-update) | ✅ | 140 | | [TYPING_START](https://discord.com/developers/docs/topics/gateway-events#typing-start) | ✅ | 141 | | USER_ACHIEVEMENT_UPDATE | ❌ | 142 | | USER_CONNECTIONS_LINK_CALLBACK | ❌ | 143 | | USER_CONNECTIONS_UPDATE | ❌ | 144 | | USER_GUILD_SETTINGS_UPDATE | ❌ | 145 | | USER_NON_CHANNEL_ACK | ❌ | 146 | | [USER_NOTE_UPDATE](./notes.md#user-note-update-dispatch-event) | ❌ | 147 | | USER_PAYMENT_CLIENT_ADD | ❌ | 148 | | USER_PAYMENT_SOURCES_UPDATE | ❌ | 149 | | USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_CREATE | ❌ | 150 | | USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_UPDATE | ❌ | 151 | | [USER_REQUIRED_ACTION_UPDATE](./account_verification.md#user-required-action-update-dispatch-event) | ❌ | 152 | | USER_SETTINGS_PROTO_UPDATE | ❌ | 153 | | USER_SUBSCRIPTIONS_UPDATE | ❌ | 154 | | [USER_UPDATE](https://discord.com/developers/docs/topics/gateway-events#user-update) | ✅ | 155 | | [VOICE_CHANNEL_EFFECT_SEND](./voice_channel_effects.md#voice-channel-effect-send-dispatch-event) | ❌ | 156 | | [VOICE_SERVER_UPDATE](https://discord.com/developers/docs/topics/gateway-events#voice-server-update) | ✅ | 157 | | [VOICE_STATE_UPDATE](https://discord.com/developers/docs/topics/gateway-events#voice-state-update) | ✅ | 158 | | [WEBHOOKS_UPDATE](https://discord.com/developers/docs/topics/gateway-events#webhooks-update) | ✅ | 159 | 160 | \* - undocumented extra fields 161 | -------------------------------------------------------------------------------- /docs/gateway_opcodes.md: -------------------------------------------------------------------------------- 1 | # Gateway Opcodes 2 | 3 | | Opcode | Name | Documented | Client Action | Description | 4 | |--------|------------------------------------------|------------|---------------|-----------------------------------------------------------------------------------------| 5 | | 0 | DISPATCH | ✅ | Receive | An event was dispatched. | 6 | | 1 | HEARTBEAT | ✅ | Send/Receive | Fired periodically by the client to keep the connection alive. | 7 | | 2 | IDENTIFY | ✅ | Send | Starts a new session during the initial handshake. | 8 | | 3 | PRESENCE_UPDATE | ✅ | Send | Update the client's presence. | 9 | | 4 | VOICE_STATE_UPDATE | ✅ | Send | Used to join/leave or move between voice channels. | 10 | | 5 | VOICE_SERVER_PING | ❌ | Send | | 11 | | 6 | RESUME | ✅ | Send | Resume a previous session that was disconnected. | 12 | | 7 | RECONNECT | ✅ | Receive | You should attempt to reconnect and resume immediately. | 13 | | 8 | REQUEST_GUILD_MEMBERS | ✅ | Send | Request information about offline guild members in a large guild. | 14 | | 9 | INVALID_SESSION | ✅ | Receive | The session has been invalidated. You should reconnect and identify/resume accordingly. | 15 | | 10 | HELLO | ✅ | Receive | Sent immediately after connecting, contains the `heartbeat_interval` to use. | 16 | | 11 | HEARTBEAT_ACK | ✅ | Receive | Sent in response to receiving a heartbeat to acknowledge that it has been received. | 17 | | 13 | CALL_CONNECT | ❌ | Send | | 18 | | 14 | GUILD_SUBSCRIPTIONS | ❌ | Send | Subscribe to sections of a guild's member list. | 19 | | 15 | LOBBY_CONNECT | ❌ | Send | Related to game invites/rich presence | 20 | | 16 | LOBBY_DISCONNECT | ❌ | Send | Related to game invites/rich presence | 21 | | 17 | LOBBY_VOICE_STATES_UPDATE | ❌ | Send | Related to game invites/rich presence | 22 | | 18 | STREAM_CREATE | ❌ | Send | Start a stream. | 23 | | 19 | STREAM_DELETE | ❌ | Send | End a stream or stop watching one. | 24 | | 20 | STREAM_WATCH | ❌ | Send | Joining a stream. | 25 | | 21 | STREAM_PING | ❌ | Send | | 26 | | 22 | STREAM_SET_PAUSED | ❌ | Send | Mark a stream as paused or unpaused. | 27 | | 24 | REQUEST_GUILD_APPLICATION_COMMANDS | ❌ | Send | Potentially unused. | 28 | | 25 | EMBEDDED_ACTIVITY_LAUNCH | ❌ | Send | Potentially unused. | 29 | | 26 | EMBEDDED_ACTIVITY_CLOSE | ❌ | Send | Leave an activity in a voice channel. | 30 | | 27 | EMBEDDED_ACTIVITY_UPDATE | ❌ | Send | Potentially unused. | 31 | | 28 | REQUEST_FORUM_UNREADS | ❌ | Send | Request the unread state of a forum channel. | 32 | | 29 | REMOTE_COMMAND | ❌ | Send | | 33 | | 30 | GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH | ❌ | Send | | 34 | | 31 | REQUEST_SOUNDBOARD_SOUNDS | ❌ | Send | Request guilds' soundboards | 35 | | 32 | SPEED_TEST_CREATE | ❌ | Send | | 36 | | 33 | SPEED_TEST_DELETE | ❌ | Send | | 37 | | 34 | REQUEST_LAST_MESSAGES | ❌ | Send | Potentially unused. | 38 | | 35 | SEARCH_RECENT_MEMBERS | ❌ | Send | Potentially unused. | 39 | 40 | ## VOICE_SERVER_PING 41 | 42 | Unknown. `d` is null 43 | 44 | ## CALL_CONNECT 45 | 46 | Unknown. 47 | 48 | | Field | Type | Description | 49 | |------------|------|-------------| 50 | | channel_id | | | 51 | 52 | ## LOBBY_CONNECT 53 | 54 | | Field | Type | Description | 55 | |--------------|------|-------------| 56 | | lobby_id | | | 57 | | lobby_secret | | | 58 | 59 | ## LOBBY_DISCONNECT 60 | 61 | | Field | Type | Description | 62 | |----------|------|-------------| 63 | | lobby_id | | | 64 | 65 | ## LOBBY_VOICE_STATES_UPDATE 66 | 67 | | Field | Type | Description | 68 | |-----------|------|-------------| 69 | | lobby_id | | | 70 | | self_mute | | | 71 | | self_deaf | | | 72 | 73 | ## STREAM_CREATE 74 | 75 | Used to start a stream. 76 | 77 | | Field | Type | Description | 78 | |------------------|-----------|------------------------------------------| 79 | | type | string | type of the stream. `guild` | 80 | | guild_id | snowflake | guild the stream is in | 81 | | channel_id | snowflake | channel the stream is in | 82 | | preferred_region | string | preferred region to create the stream in | 83 | 84 | ## STREAM_DELETE 85 | 86 | Used to leave/end a stream 87 | 88 | | Field | Type | Description | 89 | |------------|--------|-----------------------------| 90 | | stream_key | string | | 91 | 92 | ## STREAM_WATCH 93 | 94 | Used when joining a stream. 95 | 96 | | Field | Type | Description | 97 | |------------|--------|----------------| 98 | | stream_key | string | stream to join | 99 | 100 | ## STREAM_PING 101 | 102 | Unknown. `d` contains key `stream_key` 103 | 104 | ## STREAM_SET_PAUSED 105 | 106 | Used to mark a stream as paused or unpaused 107 | 108 | | Field | Type | Description | 109 | |------------|---------|------------------------------------------| 110 | | stream_key | string | stream key to mark as paused or unpaused | 111 | | paused | boolean | is the stream paused | 112 | 113 | ## EMBEDDED_ACTIVITY_CLOSE 114 | 115 | Used when leaving an activity in a voice channel. 116 | 117 | | Field | Type | Description | 118 | |----------------|------------|-------------------------------| 119 | | guild_id | ?snowflake | guild id the activity is in | 120 | | channel_id | snowflake | channel id the activity is in | 121 | | application_id | snowflake | | 122 | 123 | ## REQUEST_FORUM_UNREADS 124 | 125 | Used to request the unread state of a forum channel. Gateway will send a `FORUM_UNREADS` dispatch event in response. 126 | 127 | | Field | Type | Description | 128 | |------------|------------------|-------------------------------------------| 129 | | guild_id | snowflake | guild id of the forum channel | 130 | | channel_id | snowflake | channel id of the forum channel | 131 | | threads | thread subobject | list of threads to fetch unread state for | 132 | 133 | ### Thread subobject 134 | 135 | | Field | Type | Description | 136 | |----------------|-----------|-------------------------| 137 | | thread_id | snowflake | thread id | 138 | | ack_message_id | snowflake | id of last read message | 139 | 140 | ## GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH 141 | 142 | | Field | Type | Description | 143 | |------------------|-----------------|-------------| 144 | | guild_id | snowflake | | 145 | | channel_ids_hash | array of string | | 146 | | role_ids_hash | array of string | | 147 | | emoji_ids_hash | array of string | | 148 | | sticker_ids_hash | array of string | | 149 | 150 | ## REQUEST_SOUNDBOARD_SOUNDS 151 | 152 | Request guilds' soundboards. Gateway will fire a `SOUNDBOARD_SOUNDS` dispatch event for each requested guild. 153 | 154 | | Field | Type | Description | 155 | |-----------|--------------------|---------------------------------| 156 | | guild_ids | array of snowflake | guilds to fetch soundboards for | 157 | 158 | ## SPEED_TEST_CREATE 159 | 160 | Unknown. 161 | 162 | | Field | Type | Description | 163 | |------------------|------|-------------| 164 | | preferred_region | | | 165 | 166 | ## SPEED_TEST_DELETE 167 | 168 | Unknown. `d` is null. 169 | 170 | ## REQUEST_LAST_MESSAGES 171 | 172 | Unknown. 173 | 174 | | Field | Type | Description | 175 | |-------------|------|-------------| 176 | | guild_id | | | 177 | | channel_ids | | | 178 | 179 | ## SEARCH_RECENT_MEMBERS 180 | 181 | Unknown. 182 | 183 | | Field | Type | Description | 184 | |--------------------|------|-------------| 185 | | guild_id | | | 186 | | query | | | 187 | | continuation_token | | | 188 | -------------------------------------------------------------------------------- /docs/get_role_members.md: -------------------------------------------------------------------------------- 1 | # Get Role Members 2 | 3 | **GET** `/guilds/{guild.id}/roles/{role.id}/member-ids`
4 | Retrieves up to 100 member IDs who have the given role
5 | Appears to require VIEW_AUDIT_LOG permission
6 | 7 | Returns array of snowflakes 8 | -------------------------------------------------------------------------------- /docs/guild_avatars.md: -------------------------------------------------------------------------------- 1 | # Guild Avatars 2 | 3 | Per-server avatars are implemented by adding a new optional/nullable(?) field `avatar` to the guild member object representing a hash like the `avatar` field of the user object. 4 | 5 | The asset can be accessed with this URL: 6 | 7 | `https://cdn.discordapp.com/guilds/{guild.id}/users/{user.id}/avatars/{hash}.{ext}` 8 | 9 | This URL likewise respects the size parameter 10 | -------------------------------------------------------------------------------- /docs/guild_directories.md: -------------------------------------------------------------------------------- 1 | # Guild Directories 2 | 3 | Guild directories are a special type of channel that serve as directories for servers. They are locked behind the 4 | `HUBS` guild feature. 5 | 6 | ## Get Directory Channel Entries 7 | 8 | **GET** `/channels/{channel.id}/directory-entries` 9 | 10 | Returns array of [Directory Entry](#directory-entry-object) 11 | 12 | ## Directory Entry Object 13 | 14 | | Field | Type | Description | 15 | |-----------------------------|-------------------------------------------------|---------------------------------------------| 16 | | directory_channel_id | snowflake | id of channel to which the entry belongs(?) | 17 | | entity_id | snowflake | id of the guild the entry is for | 18 | | type | [directory entry type](#directory-entry-type) | the type of the entry | 19 | | author_id | snowflake | who created the entry | 20 | | created_at | ISO-8601 timestamp | when the entry was created | 21 | | description | string | description displayed for the entry | 22 | | name? | ?string | name of the entry | 23 | | icon? | ?string | icon of the entry | 24 | | splash? | ?string | splash of the guild | 25 | | features? | ?array | array of guild features | 26 | | approximate_member_count? | ?number | number of members | 27 | | approximate_presence_count? | ?number | number of online members | 28 | 29 | ## Directory Entry Type 30 | 31 | | Name | Value | 32 | |-------|-------| 33 | | GUILD | 0 | 34 | 35 | ## Create Directory Entry 36 | 37 | **POST** `/channels/{channel.id}/directory-entry/{entry.id}` 38 | 39 | Request body: 40 | 41 | | Field | Type | Description | 42 | |-------------|--------|--------------------------| 43 | | description | string | description of the entry | 44 | 45 | Creates a new entry for the directory 46 | -------------------------------------------------------------------------------- /docs/guild_discovery.md: -------------------------------------------------------------------------------- 1 | # Guild Discovery 2 | 3 | ## Get Discovery Categories 4 | 5 | **GET** `/discovery/categories`
6 | Returns array of [discovery category objects](#discovery-category-object) (unlocalized objects) 7 | 8 | GET parameters: 9 | 10 | | Name | Type | Description | 11 | |--------------|--------|-----------------------------------------------| 12 | | locale | string | locale to return. doesn't seem to do anything | 13 | | primary_only | bool | only return primary-level categories | 14 | 15 | ### Discovery Category Object 16 | 17 | | Field | Type | Description | 18 | |------------|----------------------------------------------------|----------------------------------------------------------------| 19 | | id | integer | unique id for the category | 20 | | is_primary | bool | whether this category can be set as a guild's primary category | 21 | | name | string or [localized name](#localized-name-object) | name of the category | 22 | 23 | ### Localized Name Object 24 | 25 | | Field | Type | Description | 26 | |---------------|--------------------------------------------------------|----------------------------------------| 27 | | default | string | fallback localization string (english) | 28 | | localizations | array of object, key is language code, value is string | localized versions of the string | 29 | 30 | ## Get Discoverable Guilds 31 | 32 | **GET** `/discoverable-guilds`
33 | Returns [discoverable guilds response object](#discoverable-guilds-response-object)
34 | 35 | GET parameters: 36 | 37 | | Name | Type | Description | 38 | |------------|---------|--------------------------------| 39 | | offset | integer | offset into the list of guilds | 40 | | limit | integer | limit of guilds to get | 41 | | categories | integer | category to limit response to | 42 | 43 | ### Discoverable Guilds Response Object 44 | 45 | | Field | Type | Description | 46 | |--------|------------------------------------------------------------------------------------------------------------------------|---------------------------------| 47 | | limit | integer | limit given in request | 48 | | offset | integer | offset given in request | 49 | | total | integer | total number of matching guilds | 50 | | guilds | array of [guild objects](https://discord.com/developers/docs/resources/guild#guild-object) with extra keys (see below) | list of discoverable guilds | 51 | 52 | guilds object extra fields: 53 | 54 | | Field | Type | Description | 55 | |------------------------|-----------------------------------------------------------------------------|----------------------------| 56 | | keywords | array of string | keywords of the guild | 57 | | primary_category_id(?) | integer | id of the primary category | 58 | | categories | array of localized [discovery category objects](#discovery-category-object) | categories of the guild | 59 | | auto_removed(?) | bool(?) | unknown | 60 | 61 | ## Join Discoverable Guild 62 | 63 | **PUT** `/guilds/{guild.id}/members/@me`
64 | Returns a [guild object](https://discord.com/developers/docs/resources/guild#guild-object)
65 | The official client also adds the GET parameters `lurker=false` though it's unclear what difference this makes 66 | 67 | ## Searching Discoverable Guilds 68 | 69 | Discord uses [Algolia](https://algolia.com) with key `NKTZZ4AIZU` to search for guilds which is beyond the scope of this 70 | page
71 | GET `/discovery/valid-term?term={term}` will return `{"valid": true}` if a search term is valid 72 | -------------------------------------------------------------------------------- /docs/guild_lurking.md: -------------------------------------------------------------------------------- 1 | # Guild Lurking 2 | 3 | Guilds with the feature `PREVIEW_ENABLED` can be "lurked" in/previewed before actually joining. This is basically the 4 | same as joining except you are granted no permissions and are not counted as a member 5 | 6 | ## Start Lurking 7 | 8 | PUT `/guilds/{guild.id}/members/@me?lurker=true&session_id={session.id}`
9 | Session ID is presumably the one found in the READY gateway message and you will be removed when this session 10 | expires
11 | Returns a [guild object](https://discord.com/developers/docs/resources/guild#guild-object) 12 | 13 | ## Stop Lurking 14 | 15 | Same as [Leave Guild](join_leave_guild.md#leave-guild) 16 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # discord-undocumented 2 | 3 | Documentation for various parts of Discord's API that are otherwise undocumented.
4 | This primarily includes things I've had to figure out myself while implementing 5 | [my third-party client](https://github.com/uowuo/abaddon) or other things out of interest. 6 | 7 | See the sidebar on the left for a list of topics. 8 | -------------------------------------------------------------------------------- /docs/join_leave_guild.md: -------------------------------------------------------------------------------- 1 | # Join/Leave Guild 2 | 3 | ## Join Guild 4 | 5 | **POST** `/invites/{invite.code}` 6 | 7 | ## Leave Guild 8 | 9 | **DELETE** `/users/@me/guilds/{guild.id}` 10 | -------------------------------------------------------------------------------- /docs/manage_discovery_partnership.md: -------------------------------------------------------------------------------- 1 | # Managing Guild Discovery and Partnership 2 | 3 | ## Get Guild Discovery Requirements 4 | 5 | **GET** `/guilds/{guild.id}/discovery-requirements`
6 | Returns a [guild requirements object](#guild-requirements-object) 7 | 8 | ## Get Guild Partnership Requirements 9 | 10 | **GET** `/partners/{guild.id}/requirements`
11 | Returns a [guild requirements object](#guild-requirements-object) 12 | 13 | ### Guild Requirements Object 14 | 15 | | Field | Type | Description | 16 | |---------------------------------|---------------------------------------------------|----------------------------------------------| 17 | | age | bool | is the guild old enough | 18 | | engagement_healthy | bool | do members visit and talk enough | 19 | | health_score | [health score object](#health-score-object) | unknown | 20 | | health_score_pending | bool | is waiting on server activity metrics | 21 | | healthy | bool | are server activity requirements met | 22 | | nsfw_properties | [nsfw properties object](#nsfw-properties-object) | channels with meanie words in them | 23 | | protected | bool | is 2FA enabled for moderators | 24 | | retention_healthy | bool | is member retention sufficient | 25 | | safe_environment | bool | if false, guild was flagged by Trust & Safety | 26 | | size | bool | are there enough members in the guild | 27 | | sufficient | bool | are all requirements met | 28 | | sufficient_without_grace_period | bool | unknown | 29 | | minimum_age | integer | how many days old the guild must be | 30 | | minimum_size | integer | how many members the guild must have | 31 | | valid_rules_channel | bool | does the guild have a rules channel | 32 | 33 | ### NSFW Properties Object 34 | 35 | | Field | Type | Description | 36 | |----------|--------------------|----------------------------------| 37 | | channels | array of snowflake | channels with unacceptable names | 38 | 39 | ### Health Score Object 40 | 41 | | Field | Type | Description | 42 | |--------------------------|------|-------------| 43 | | avg_nonnew_participants | ? | | 44 | | avg_nonnew_communicators | ? | | 45 | | num_intentful_joiners | ? | | 46 | | perc_ret_w1_intentful | ? | | 47 | -------------------------------------------------------------------------------- /docs/member_verification.md: -------------------------------------------------------------------------------- 1 | # Member Verification 2 | 3 | ## Member Verification Gate and Guild Applications 4 | 5 | Guilds with the feature `MEMBER_VERIFICATION_GATE_ENABLED` require new members to verify themselves
6 | Guilds may also create forms that users submit in order to apply for access to a guild
7 | 8 | ## Get Member Verification Gate 9 | 10 | **GET** `/guilds/{guild.id}/member-verification`
11 | The official client adds parameters `with_guild=true` and `invite_code=` but these don't seem to do anything
12 | Returns a [verfication gate info object](#verification-gate-info-object) or 204 No Content if there is no verification gate 13 | 14 | ## Modify Member Verification Gate 15 | 16 | **PATCH** `/guilds/{guild.id}/member-verification`
17 | Request body is a partial [verfication gate info object](#verification-gate-info-object)
18 | Returns a [verfication gate info object](#verification-gate-info-object) 19 | 20 | ### Verification Gate Info Object 21 | 22 | | Field | Type | Description | 23 | |--------------|--------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------| 24 | | description? | string | description of the server | 25 | | form_fields? | array of [verification field objects](#verification-field-object) | list of fields | 26 | | version? | timestamp | string timestamp representing when the verification info was last updated | 27 | | enabled? | bool | seems to be present only in [Modify Member Verification Gate](#modify-member-verification-gate) | 28 | 29 | ### Verification Field Object 30 | 31 | | Field | Type | Description | 32 | |------------|-----------------|-------------------------------------------------------------------------| 33 | | field_type | string | type of field. see below | 34 | | label | string | label of the field | 35 | | required | bool | whether it is required to check the checkbox in order to submit | 36 | | response | bool | true to indicate the terms were accepted | 37 | | values | array of string | list of parameters for the field. see below | 38 | 39 | ### Verification Field Type 40 | 41 | | Name | Description | 42 | |-----------------|-----------------------------------------------------| 43 | | TERMS | "Server Rules" `values` is a list of a server rules | 44 | | TEXT_INPUT | "Short Answer" `values` is unknown | 45 | | PARAGRAPH | "Paragraph" `values` is unknown | 46 | | MULTIPLE_CHOICE | "Multiple Choice" `values` is unknown | 47 | | VERIFICATION | "Connections" `values` is unknown | 48 | | FILE_UPLOAD | Not present in code; only a translation string | 49 | 50 | ## Request to Join Guild 51 | 52 | **PUT** `/guilds/{guild.id}/requests/@me`
53 | Request body is the [verification info object](#verification-gate-info-object) the user accepted
54 | Returns 201 Created and a [guild application object](#guild-application-object) on success
55 | 56 | ### Guild Application Object 57 | 58 | | Field | Type | Description | 59 | |--------------------|-------------------------------------------------------------------------------|--------------------------------------------------------| 60 | | application_status | string | may be "STARTED", "PENDING", "REJECTED", or "APPROVED" | 61 | | created_at | ?timestamp | string timestamp when the application was created | 62 | | guild_id | snowflake | id of the guild being applied to | 63 | | last_seen | ?timestamp | unknown | 64 | | rejection_reason | ?string | reason for rejection (if rejected) | 65 | | user_id | snowflake | id of the user who created the application | 66 | | user? | [user object](https://discord.com/developers/docs/resources/user#user-object) | the user who created the request | 67 | 68 | ### Guild Join Request Create Dispatch Event 69 | 70 | Sent when a guild join request is created such as when joining a server with a verification gate. Structure appears to be the same as [Guild Join Request Update Dispatch Event](#guild-join-request-update-dispatch-event) 71 | 72 | ### Guild Join Request Update Dispatch Event 73 | 74 | Sent when a guild join request is updated such as when accepting rules through the verification gate 75 | 76 | | Field | Type | | 77 | |----------|-------------------------------------------------------|--------------------------------| 78 | | status | string | see `application_status` above | 79 | | guild_id | snowflake | the guild the request is from | 80 | | request | [guild application object](#guild-application-object) | the new request | 81 | 82 | ### Guild Join Request Delete Dispatch Event 83 | 84 | Sent when a request is deleted such as when leaving a server before completing the verification gate 85 | 86 | | Field | Type | | 87 | |----------|-----------|------------------------------| 88 | | user_id | snowflake | user who created the request | 89 | | guild_id | snowflake | guild the request is for | 90 | -------------------------------------------------------------------------------- /docs/modify_guild.md: -------------------------------------------------------------------------------- 1 | # Modify Guild Extra Parameters 2 | 3 | [Original documentation](https://discord.com/developers/docs/resources/guild#modify-guild) 4 | 5 | Extra JSON parameters: 6 | 7 | | Field | Type | Description | 8 | |----------|-------------------|-------------| 9 | | features | array of features | see below | 10 | 11 | The following features have been seen in Modify Guild: 12 | 13 | * NEWS (sent along with DISCOVERABLE) 14 | * COMMUNITY (sent when enabling community mode) 15 | * DISCOVERABLE (sent when enabling guild discovery) 16 | 17 | Additionally, setting `system_channel_id`, `rules_channel_id`, or `public_updates_channel_id`, to 1 in this endpoint (at least when adding the "COMMUNITY" feature) will create new channels 18 | -------------------------------------------------------------------------------- /docs/notes.md: -------------------------------------------------------------------------------- 1 | # User Notes 2 | 3 | ## Get User Note 4 | 5 | **GET** `/users/@me/notes/{user.id}` 6 | 7 | Returns a [user note object](#user-note-object) or a 404 if no note is set 8 | 9 | ## Set User Note 10 | 11 | **PUT** `/users/@me/notes/{user.id}`
12 | JSON parameters: 13 | 14 | | Field | Type | Description | 15 | |-------|--------|--------------------------------| 16 | | note | string | the note to assign to the user | 17 | 18 | Returns the new [user note object](#user-note-object) 19 | 20 | ### User Note Update dispatch event 21 | 22 | Sent whenever a user's note is updated 23 | 24 | | Field | Type | Description | 25 | |-------|-----------|------------------------------------------------| 26 | | note | string | the note assigned to the user | 27 | | id | snowflake | the id of the user whose note has been updated | 28 | 29 | ### User Note Object 30 | 31 | Whether the fields are optional or can be null is unknown. In testing, they are always present and non-null 32 | 33 | | Field | Type | Description | 34 | |--------------|-----------|-------------------------------------------------------------------------| 35 | | note | string | the note assigned to the user | 36 | | note_user_id | snowflake | the id of the user with the note | 37 | | user_id | snowflake | the id of the user who created the note (apparently always your own id) | 38 | -------------------------------------------------------------------------------- /docs/profile.md: -------------------------------------------------------------------------------- 1 | # User Profiles 2 | 3 | ## Get User Profile 4 | 5 | **GET** `/users/{user.id}/profile`
6 | Returns a [user profile object](#user-profile-object) or 404 if the user does not exist
7 | Note: a deleted guild can be returned in `mutual_guilds` (including the `nick` field), so do not assume all the guilds in `mutual_guilds` actually exist. The official client simply hides this information 8 | 9 | ### User Profile Object 10 | 11 | | Field | Type | Description | 12 | |----------------------|-------------------------------------------------------------------------------|--------------------------------------------------------------------------| 13 | | user | [user object](https://discord.com/developers/docs/resources/user#user-object) | the user whose profile was requested* | 14 | | ?premium_since | string? | timestamp of when the user first purchased nitro(?) | 15 | | ?premium_guild_since | string? | timestamp of when the user began boosting the guild | 16 | | connected_accounts | array of [connection objects](#connection-object) | list of the user's connected accounts | 17 | | mutual_guilds | array of [mutual guild objects](#mutual-guild-object) | list of mutual guilds between the requesting user and the requested user | 18 | 19 | \* this user object may have extra fields such as profile customization information (see: [Profile Customation](./profile_customization)) 20 | 21 | ### Mutual Guild Object 22 | 23 | | Field | Type | Description | 24 | |-------|-----------|--------------------------------------------| 25 | | id | snowflake | id of the guild | 26 | | ?nick | string | the requested user's nickname in the guild | 27 | 28 | ### Connection Object 29 | 30 | | Field | Type | Description | 31 | |----------|--------|----------------------------------------------------------------| 32 | | id | string | unique identifier for the user's connection on the service | 33 | | type | string | [type](#connection-types) of service the connection represents | 34 | | name | string | name of the user's connection. not necessarily unique | 35 | | verified | bool | if the user's connection has been verified | 36 | 37 | ### Connection Types 38 | There may be more but this should be all of them 39 | 40 | * battlenet 41 | * facebook 42 | * github 43 | * reddit 44 | * skype 45 | * spotify 46 | * steam 47 | * twitch 48 | * twitter 49 | * xbox 50 | * youtube 51 | -------------------------------------------------------------------------------- /docs/ready_event.md: -------------------------------------------------------------------------------- 1 | # Ready Event Extra Fields 2 | 3 | | Field | Type | Description | 4 | | ---------------------|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------| 5 | | guild_join_requests? | array of [guild application objects](member_verification.md#guild-application-object) | applications the user has made for guilds. used in verification gates | 6 | | required_action? | string | see [required action type](#required-action-type) | 7 | 8 | ## Required Action Type 9 | 10 | | Type | Description | 11 | |------------------------|---------------------------------------| 12 | | AGREEMENTS | user must accept new terms of service | 13 | | REQUIRE_VERIFIED_EMAIL | user must verify their email | 14 | | REQUIRE_VERIFIED_PHONE | user must verify their phone | 15 | | REQUIRE_CAPTCHA | user must complete a captcha | 16 | -------------------------------------------------------------------------------- /docs/ready_supplemental.md: -------------------------------------------------------------------------------- 1 | # Ready Supplemental Event 2 | 3 | This event appears to change every once in a while so these docs might be out of date (probably not)
4 | The ordering of the `merged_members` field appears to match that of the `guilds` array sent in the READY event 5 | 6 | | Field | Type | Description | 7 | |-----------------------|-------------------------------------------------------------------------------------------------------------|----------------------------------------------------------| 8 | | merged_presences | [merged presences object](#merged-presences-object) | presences of friends and various users in guilds | 9 | | merged_members | array of array of [member objects](https://discord.com/developers/docs/resources/guild#guild-member-object) | various members in guilds | 10 | | guilds | array | appears to contain information regarding voice states | 11 | | lazy_private_channels | array | | 12 | | disclose | array of string | contains pomelo if the user should update their username | 13 | 14 | ## Merged Presences Object 15 | 16 | Similar the READY_SUPPLEMENTAL's `guild_members` field, the `guilds` array's ordering appears to match that of the `guilds` array sent in the READY event 17 | 18 | | Field | Type | Description | 19 | |---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------| 20 | | guilds | array of objects similar to [presence](#https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields) except `user_id` is always present and not `id` | the presence of a user in a guild | 21 | | friends | same as above | the presence of a friend | 22 | -------------------------------------------------------------------------------- /docs/relationships.md: -------------------------------------------------------------------------------- 1 | # User Relationships 2 | 3 | ## Get User Relationships 4 | 5 | **GET** `/users/@me/relationships`
6 | 7 | Returns an array of [relationship objects](#relationship-object) with an extra key `type` representating the [relationship type](#relationship-type) 8 | 9 | ## Send Friend Request by Tag 10 | 11 | **POST** `/users/@me/relationships`
12 | 13 | Returns a 204 on success
14 | 15 | JSON parameters: 16 | 17 | | Field | Type | Description | 18 | |---------------|--------|-------------------| 19 | | username | string | the username | 20 | | discriminator | int | the discriminator | 21 | 22 | ## Send Friend Request by ID or Accept Friend Request 23 | 24 | **PUT** `/users/@me/relationships/{user.id}`
25 | Returns a 204 on success
26 | 27 | Request body must be `{}` 28 | 29 | ## Remove Relationship 30 | 31 | **DELETE** `/users/@me/relationships/{user.id}`
32 | This is used for removing a friend or block, canceling an outgoing request, or ignoring an incoming request
33 | 34 | Returns a 204 on success 35 | 36 | ## Block User 37 | 38 | **PUT** `/users/@me/relationships/{user.id}`
39 | 40 | Returns a 204 on success
41 | 42 | Request body must be `{"type":2}` 43 | 44 | ## Get Mutual Friends 45 | 46 | **GET** `/users/{user.id}/relationships`
47 | Returns an array of [user objects](https://discord.com/developers/docs/resources/user#user-object) 48 | 49 | ## Modify Friend Nickname
50 | 51 | **GET** `/users/@me/relationships/{user.id}`
52 | Modifies the nickname of the friend
53 | Fires a RELATIONSHIP_UPDATE event containing a [relationship object](#relationship-object) 54 | 55 | Returns 204 No Content on success 56 | 57 | JSON parameters: 58 | 59 | | Field | Type | Description | 60 | |----------|---------|-------------------------| 61 | | nickname | string? | nickname for the friend | 62 | 63 | 64 | ## Relationship Type 65 | 66 | | Type | Value | 67 | |------------------|-------| 68 | | None | 0 | 69 | | Friend | 1 | 70 | | Blocked | 2 | 71 | | Pending Incoming | 3 | 72 | | Pending Outgoing | 4 | 73 | | Implicit | 5 | 74 | 75 | ## Relationship Object 76 | 77 | | Field | Type | Description | 78 | |----------|-------------------------------------------------------------------------------|------------------------------------------------| 79 | | id | snowflake | id of the user who the relationship is between | 80 | | type | [relationship type](#relationship-type) | type of the relationship | 81 | | nickname | string? | the friend's nickname | 82 | | user? | [user object](https://discord.com/developers/docs/resources/user#user-object) | the user | 83 | 84 | [Relationship objects](#relationship-object) can be found in the gateway READY event under the field `relationships` 85 | -------------------------------------------------------------------------------- /docs/remote_auth.md: -------------------------------------------------------------------------------- 1 | # Remote Auth (QR Code Login) 2 | 3 | Remote auth lets you log into Discord on desktop by scanning a QR code on your phone. 4 | 5 | On desktop, Discord firsts open a WebSocket connection to `REMOTE_AUTH_ENDPOINT`, currently `wss://remote-auth-gateway.discord.gg/?v=2` 6 | 7 | ???+ info 8 | Unlike the normal Discord gateway, data fields do not belong to a `d` sub-object; all fields are at the top level, next to `op`. For example, the `hello` opcode looks like this: 9 | ```json 10 | { 11 | "op": "hello", 12 | "timeout_ms": 123456, 13 | "heartbeat_interval": 41250 14 | } 15 | ``` 16 | 17 | On open, the gateway sends opcode `hello`. 18 | 19 | ## `hello` 20 | 21 | | Field | Type | Description | 22 | |--------------------|---------|-------------------------------------------------------------------------------| 23 | | timeout_ms | integer | milliseconds until the client should disconnect with `4003 Handshake Timeout` | 24 | | heartbeat_interval | integer | milliseconds interval for sending `heartbeat` ops | 25 | 26 | When the desktop receives `hello`, it uses the SubtleCrypto interface to generate a 2048-bit RSA key and encodes the public key in SubjectPublicKeyInfo format. 27 | 28 | The desktop then sends an opcode `init`. 29 | 30 | ## `init` 31 | 32 | | Field | Type | Description | 33 | |--------------------|--------|---------------------------| 34 | | encoded_public_key | string | base64-encoded public key | 35 | 36 | The gateway responds with opcode `nonce_proof`. 37 | 38 | ## `nonce_proof` (Server to client) 39 | 40 | | Field | Type | Description | 41 | |-----------------|--------|--------------------------------| 42 | | encrypted_nonce | string | base64-encoded encrypted nonce | 43 | 44 | The desktop decrypts it with its private key using OAEP and sends back a `nonce_proof`. 45 | 46 | ## `nonce_proof` (Client to server) 47 | 48 | | Field | Type | Description | 49 | |-------|--------|--------------------------------| 50 | | nonce | string | base64-encoded decrypted nonce | 51 | 52 | The gateway responds with `pending_remote_init` and then the next stop involves scanning the QR code. 53 | 54 | ## `pending_remote_init` 55 | 56 | | Field | Type | Description | 57 | |-------------|--------|-------------| 58 | | fingerprint | string | | 59 | 60 | The QR code is generated using the string `https://discord.com/ra/{fingerprint}`. 61 | 62 | When a mobile device scans the QR code, it extracts the fingerprint from the url and makes a REMOTE_AUTH_INITIALIZE request. 63 | 64 | ## REMOTE_AUTH_INITIALIZE 65 | 66 | ### POST `/users/@me/remote-auth` 67 | 68 | | Field | Type | Description | 69 | |-------------|--------|------------------------------| 70 | | fingerprint | string | fingerprint from the QR code | 71 | 72 | Return value: 73 | 74 | | Field | Type | Description | 75 | |-----------------|--------|-----------------------------------| 76 | | handshake_token | string | temporary token to finalize login | 77 | 78 | After the mobile device makes this request, the remote auth gateway sends a `pending_ticket` to the desktop. 79 | 80 | ## `pending_ticket` 81 | 82 | | Field | Type | Description | 83 | |------------------------|--------|----------------------------------------| 84 | | encrypted_user_payload | string | encrypted user payload described below | 85 | 86 | ### Encrypted user payload 87 | 88 | `:::` 89 | 90 | The mobile device then confirms the login request with a REMOTE_AUTH_FINISH request. 91 | 92 | ## REMOTE_AUTH_FINISH 93 | 94 | ### POST `/users/@me/remote-auth/finish` 95 | 96 | | Field | Type | Description | 97 | |-----------------|---------|-----------------------------------| 98 | | handshake_token | string | token from REMOTE_AUTH_INITIALIZE | 99 | | temporary | boolean | false | 100 | 101 | After the mobile device sends a REMOTE_AUTH_FINISH, the gateway sends a `pending_login` to the desktop and the websocket is closed. 102 | 103 | ## `pending_login` 104 | 105 | | Field | Type | Description | 106 | |--------|--------|---------------------------------------| 107 | | ticket | string | ticket to use for obtaining the token | 108 | 109 | ## REMOTE_AUTH_LOGIN 110 | 111 | After getting the ticket, the desktop makes one last request to get the token 112 | 113 | ### POST `/users/@me/remote-auth/login` 114 | 115 | | Field | Type | Description | 116 | |--------|--------|-----------------------------| 117 | | ticket | string | ticket from `pending_login` | 118 | 119 | Response: 120 | 121 | | Field | Type | Description | 122 | |-----------------|--------|-------------------------------------------------| 123 | | encrypted_token | string | encrypted token, decrypted like everything else | 124 | 125 | ## REMOTE_AUTH_CANCEL 126 | 127 | The mobile device can cancel a pending remote auth login by sending a REMOTE_AUTH_CANCEL. The desktop receives a `cancel` event. 128 | 129 | ### POST `/users/@me/remote-auth/cancel` 130 | 131 | | Field | Type | Description | 132 | |-----------------|--------|-----------------------------------| 133 | | handshake_token | string | token from REMOTE_AUTH_INITIALIZE | 134 | 135 | ## `cancel` 136 | 137 | Received when the mobile device cancels a login request. There is no extra data for this op. 138 | -------------------------------------------------------------------------------- /docs/role_member_counts.md: -------------------------------------------------------------------------------- 1 | # Get Role Member Counts 2 | 3 | Retrieves the number of members with each role (roughly.)
4 | 5 | **GET** `/api/guilds/{guild.id}/roles/member-counts`
6 | Appears to require VIEW_AUDIT_LOG permission 7 | 8 | Returns JSON object where the key is the role ID and the value is the number of members
9 |
10 | ???+ example 11 | Example (using the Discord API guild):
12 | GET `https://discord.com/api/v9/guilds/81384788765712384/roles/member-counts`
13 | ```json 14 | { 15 | "585569508501094449": 14, 16 | "159592059873787904": 45, 17 | "254077236989132800": 7, 18 | "187053776920641536": 420, 19 | "233981945279807488": 33 20 | trimmed... 21 | } 22 | ``` 23 | -------------------------------------------------------------------------------- /docs/search.md: -------------------------------------------------------------------------------- 1 | # Search Messages 2 | 3 | ## Search for messages in a guild 4 | **GET** `/guilds/{guild.id}/messages/search` 5 | 6 | ## Search for messages in a DM 7 | **GET** `/channels/{channel.id}/messages/search` 8 | 9 | Returns [search results object](#search-results-object) or a 202 Accepted with response code 110000 (Index not yet available. Try again later) if the guild/channel is not indexed
10 | 11 | GET parameters: 12 | 13 | | Field | Type | Description | 14 | |-------------|-----------|------------------------------------------------------| 15 | | content | string | term to search for | 16 | | offset? | integer | offset into search results | 17 | | channel_id? | snowflake | channel to restrict search to | 18 | | author_id? | snowflake | author to restrict search to | 19 | | mentions? | snowflake | restrict search to mentions of given user | 20 | | has? | string | "link", "embed", or "file" | 21 | | max_id? | snowflake | maximum id of the search results. used for `before:` | 22 | | min_id? | snowflake | minimum id of the search results. used for `after:` | 23 | | sort_by? | string | relevance or timestamp | 24 | | sort_order? | string | desc or asc | 25 | | include_nsfw? | boolean | include NSFW results | 26 | 27 | ## Search Results Object 28 | 29 | | Field | Type | Description | 30 | |-----------------|--------------------------------------------------------------------------------------------------|--------------------------------| 31 | | analytics_id(?) | string | unknown | 32 | | messages | array of [message objects](https://discord.com/developers/docs/resources/channel#message-object) | messages matching search query | 33 | | total_results | integer | | -------------------------------------------------------------------------------- /docs/slash_commands.md: -------------------------------------------------------------------------------- 1 | # Slash Commands 2 | 3 | ## Query Application Commands 4 | 5 | Opcode 24 is used to request the application commands in a guild. The gateway will respond with a `GUILD_APPLICATION_COMMANDS_UPDATE`
6 | JSON parameters: 7 | 8 | | Field | Type | Description | 9 | |-----------------|-----------|------------------------------------------------------------------------------| 10 | | guild_id | snowflake | guild to request application commands for | 11 | | applications | bool | should the applications field be sent | 12 | | nonce | string | unique value to differentiate responses. discord uses an incrementing number | 13 | | offset | int | offset into list of commands | 14 | | limit | int | max commands (discord uses 10) | 15 | | application_id? | ? | ? | 16 | 17 | ## GUILD_APPLICATION_COMMANDS_UPDATE 18 | 19 | | Field | Type | Description | 20 | |----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------| 21 | | nonce | string | nonce sent in the request | 22 | | updated_at | unix timestamp | ? | 23 | | guild_id | snowflake | guild the response is for | 24 | | applications | array of [application objects](#application-object) | all applications for which there are commands | 25 | | application_commands | array of [ApplicationCommand](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) with [additional undocumented fields](#application-command-object) | the application commands | 26 | 27 | ### Application Object 28 | 29 | | Field | Type | Description | 30 | |---------------|-----------|-----------------------------------------------------------------| 31 | | bot | user | the bot managing the commands | 32 | | command_count | int | number of commands | 33 | | icon | string | icon hash | 34 | | id | snowflake | id of the application. can be equal to the bot's id | 35 | | name | string | name of the application. usually the same as the bot's username | 36 | 37 | ## Application Command Object 38 | Undocumented fields for [ApplicationCommand](#https://discord.com/developers/docs/interactions/slash-commands#application-command-object) 39 | 40 | | Field | Type | Description | 41 | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------| 42 | | version | snowflake | unknown | 43 | | permission | array of [ApplicationCommandPermissions](#https://discord.com/developers/docs/interactions/slash-commands#application-command-permissions-object-application-command-permissions-structure) (probably) | permissions for the command | 44 | 45 | -------------------------------------------------------------------------------- /docs/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | .md-grid { 2 | max-width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /docs/threads.md: -------------------------------------------------------------------------------- 1 | # Threads 2 | 3 | Threads are officially documented but there are some differences between the documentation designed for bot developers and what the client actually does 4 | 5 | ## Member List 6 | 7 | The client sends an Opcode 14 Lazy Request when a thread is opened: 8 | 9 | | Field | Type | Description | 10 | |---------------------|--------------------|--------------------------------------------| 11 | | guild_id | snowflake | guild the thread is in | 12 | | thread_member_lists | array of snowflake | threads to receive member list updates for | 13 | 14 | ## Thread Member List Update 15 | 16 | This is sent to the client in response to the above request. THREAD_MEMBERS_UPDATE and THREAD_MEMBER_UPDATE are sent as documented to update the list 17 | 18 | | Field | Type | Description | 19 | |-----------|----------------------------------------------------------------------------------------------------|-----------------------------------------| 20 | | thread_id | snowflake | thread for which members are being sent | 21 | | guild_id | snowflake | guild the thread is in | 22 | | members | array of [member objects](https://discord.com/developers/docs/resources/guild#guild-member-object) | current members of the thread | 23 | 24 | ## Thread Objects (extra fields) 25 | 26 | | Field | Type | Description | 27 | |--------------------|--------------------|----------------------------------------------------| 28 | | member_ids_preview | array of snowflake | contains a few ids of members for preview purposes | 29 | 30 | ## Thread List Sync (extra fields) 31 | 32 | Thread List Sync appears to always be sent when opening a channel as part of the lazy load request. It also seems to always send the status of the entire guild and never just specific channels 33 | 34 | | Field | Type | Description | 35 | |-------------------------|--------------------------|----------------------------------------------| 36 | | most_recent_messages(?) | array of message objects | contains a few messages for preview purposes | -------------------------------------------------------------------------------- /docs/update_guild_mfa_level.md: -------------------------------------------------------------------------------- 1 | # Update Guild MFA Level 2 | 3 | **POST** `/guilds/{guild.id}/mfa`
4 | Modify the MFA level of a guild. Can only be performed by the guild's owner 5 | 6 | JSON parameters: 7 | 8 | | Field | Type | Description | 9 | |-------|---------|-------------------------------------------| 10 | | level | integer | 0 to disable MFA requirement, 1 to enable | 11 | -------------------------------------------------------------------------------- /docs/user_guild_settings.md: -------------------------------------------------------------------------------- 1 | # User Guild Settings 2 | 3 | Per-guild user settings 4 | 5 | ## User Guild Settings object 6 | 7 | | Field | Type | Description | 8 | |---------|---------------------------------------------------------------------------------|-------------------------------------| 9 | | entries | array of [user guild settings entry objects](#user-guild-settings-entry-object) | entries for each guild | 10 | | partial | bool | | 11 | | version | integer | seems to increment for every update | 12 | 13 | 14 | ### User Guild Settings Entry Object 15 | 16 | | Field | Type | Description | 17 | |-----------------------|---------------------------------------------------------------|---------------------------------------------------------------------| 18 | | channel_overrides | array of [channel override objects](#channel-override-object) | overrides for specific channels | 19 | | flags | [onboarding guild flags](#onboarding-guild-flags) | used for community onboarding | 20 | | guild_id | ?snowflake | the id of the guild this entry is for, or null for private channels | 21 | | hide_muted_channels | bool | | 22 | | message_notifications | [message notifications level](#message-notifications-level) | | 23 | | mobile_push | bool | send push notifications for this guild | 24 | | mute_config | [mute configuration object](#mute-configuration-object) | used for mute for n minutes feature | 25 | | mute_scheduled_events | bool | | 26 | | muted | bool | is the guild currently muted | 27 | | notify_highlights | bool | | 28 | | suppress_everyone | bool | don't notify for @everyone | 29 | | suppress_roles | bool | don't notify for @roles | 30 | | version | integer | seems to increment for every update | 31 | 32 | 33 | ### Channel Override Object 34 | 35 | | Field | Type | Description | 36 | |-----------------------|-------------------------------------------------------------|------------------------------------------| 37 | | channel_id | snowflake | the id for the channel this entry is for | 38 | | collapsed | bool | | 39 | | flags | [onboarding channel flags](#onboarding-channel-flags) | used for community onboarding | 40 | | message_notifications | [message notifications level](#message-notifications-level) | | 41 | | mute_config | [mute configuration object](#mute-configuration-object) | used for mute for n minutes feature | 42 | | muted | bool | is the channel currently muted | 43 | 44 | ### Mute Configuration Object 45 | 46 | | Field | Type | Description | 47 | |----------------------|---------------------|--------------------------------------------------| 48 | | end_time | ?ISO-8601 timestamp | when the mute ends | 49 | | selected_time_window | integer | how many seconds the mute is for. -1 for forever | 50 | 51 | 52 | ### Message Notifications Level
53 | 54 | | Key | Value | Description | 55 | |---------------|-------|-----------------------------------------------------------------------------------------------------------------| 56 | | ALL_MESSAGES | 0 | receive notifications for all messages | 57 | | ONLY_MENTIONS | 1 | receive notifications only for messages that @mention the user | 58 | | NO_MESSAGES | 2 | don't receive notifications for any messages | 59 | | NULL | 3 | use the parent's notification settings. e.g. a channel should use the notification level of its parent category | 60 | 61 | 62 | #### Onboarding Guild Flags 63 | 64 | | Key | Value | Description | 65 | |---------------------------------|-------|-------------| 66 | | UNREADS_ALL_MESSAGES | 2048 | | 67 | | UNREADS_MENTIONS_AND_HIGHLIGHTS | 4096 | | 68 | | OPT_IN_CHANNELS_OFF | 8192 | | 69 | | OPT_IN_CHANNELS_ON | 16384 | | 70 | 71 | 72 | #### Onboarding Channel Flags 73 | 74 | | Key | Value | Description | 75 | |---------------------------------|-------|-------------| 76 | | UNREADS_MENTIONS_AND_HIGHLIGHTS | 512 | | 77 | | UNREADS_ALL_MESSAGES | 1024 | | 78 | | FAVORITED | 2048 | | 79 | | OPT_IN_ENABLED | 4096 | | 80 | | NEW_FORUM_THREADS_OFF | 8192 | | 81 | | NEW_FORUM_THREADS_ON | 16384 | | 82 | 83 | -------------------------------------------------------------------------------- /docs/voice_channel_effects.md: -------------------------------------------------------------------------------- 1 | ### Voice Channel Effects 2 | 3 | Voice channel effects are emojis that you can spam all over people's screens when they're tabbed into voice chat because that's a great feature I guess. 4 | 5 | #### Voice Channel Effect Send Dispatch Event 6 | 7 | | Field | Type | Description | 8 | |------------|---------------------------------------------------------------------|--------------------------------| 9 | | user_id | snowflake | user who sent the effect | 10 | | emoji | [emoji object](https://discord.com/developers/docs/resources/emoji) | the sent emoji | 11 | | channel_id | snowflake | channel the effect was sent to | 12 | | guild_id | snowflake | guild the channel belongs to | 13 | 14 | 15 | #### Send Voice Channel Effect 16 | 17 | POST `/channels/{channel.id}/voice-channel-effects`
18 | Returns 204 No Content on success 19 | 20 | JSON parameters: 21 | 22 | | Field | Type | Description | 23 | |------------|-----------|----------------------------------------------| 24 | | emoji_name | string | name of the emoji or actual emoji if Unicode | 25 | | emoji_id | snowflake | id of the emoji or null if Unicode | 26 | -------------------------------------------------------------------------------- /docs/voice_gateway_opcodes.md: -------------------------------------------------------------------------------- 1 | # Voice Gateway Opcodes 2 | 3 | | Opcode | Name | Documented | Client Action | Description | 4 | |--------|-------------------------------------------|------------|---------------|--------------------------------------------------------------------------------------------------------------| 5 | | 0 | IDENTIFY | ✅ | Send | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 6 | | 1 | SELECT_PROTOCOL | ✅ | Send | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 7 | | 2 | READY | ✅ | Receive | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 8 | | 3 | HEARTBEAT | ✅ | Send | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 9 | | 4 | SELECT_PROTOCOL_ACK | ✅ | Receive | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 10 | | 5 | SPEAKING | ✅ | Send/Receive | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 11 | | 6 | HEARTBEAT_ACK | ✅ | Receive | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 12 | | 7 | RESUME | ✅ | Send | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 13 | | 8 | HELLO | ✅ | Receive | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 14 | | 9 | RESUMED | ✅ | Receive | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 15 | | 12 | VIDEO | ❌ | | Used for when users enable their camera | 16 | | 13 | CLIENT_DISCONNECT | ✅ | Receive | See [official docs](https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes) | 17 | | 14 | SESSION_UPDATE | ❌ | | | 18 | | 15 | MEDIA_SINK_WANTS | ❌ | Receive | | 19 | | 16 | VOICE_BACKEND_VERSION | ❌ | Send/Receive | | 20 | | 17 | CHANNEL_OPTIONS_UPDATE | ❌ | Receive | | 21 | | 18 | [FLAGS](#flags) | ❌ | Receive | Per-user voice flags | 22 | | 19 | SPEED_TEST | ❌ | Receive | | 23 | | 20 | [PLATFORM](#platform) | ❌ | Receive | Per-user platform information | 24 | | 21 | SECURE_FRAMES_PREPARE_PROTOCOL_TRANSITION | ❌ | Receive | | 25 | | 22 | SECURE_FRAMES_EXECUTE_TRANSITION | ❌ | Receive | | 26 | | 23 | SECURE_FRAMES_READY_FOR_TRANSITION | ❌ | | | 27 | | 24 | SECURE_FRAMES_PREPARE_EPOCH | ❌ | Receive | | 28 | | 25 | MLS_EXTERNAL_SENDER_PACKAGE | ❌ | Receive | | 29 | | 26 | MLS_KEY_PACKAGE | ❌ | | | 30 | | 27 | MLS_PROPOSALS | ❌ | Receive | | 31 | | 28 | MLS_COMMIT_WELCOME | ❌ | | | 32 | | 29 | MLS_PREPARE_COMMIT_TRANSITION | ❌ | Receive | | 33 | | 30 | MLS_WELCOME | ❌ | Receive | | 34 | 35 | ## FLAGS 36 | 37 | | Field | Type | Description | 38 | |---------|-----------------------------|-------------------------| 39 | | user_id | snowflake | user the flags apply to | 40 | | flags | [voice flags](#voice-flags) | flags | 41 | 42 | ### Voice Flags 43 | 44 | | Key | Value | Description | 45 | |--------|------------------------|-------------| 46 | | 1 << 0 | CLIPS_ENABLED | | 47 | | 1 << 1 | ALLOW_VOICE_RECORDING | | 48 | | 1 << 2 | ALLOW_ANY_VIEWER_CLIPS | | 49 | 50 | ## PLATFORM 51 | 52 | description is a guess 53 | 54 | | Field | Type | Description | 55 | |----------|---------------------------------|--------------------------| 56 | | user_id | snowflake | user to set platform for | 57 | | platform | [platform type](#platform-type) | their platform | 58 | 59 | ### Platform Type 60 | 61 | | Key | Value | 62 | |-----|-------------| 63 | | 0 | DESKTOP | 64 | | 1 | MOBILE | 65 | | 2 | XBOX | 66 | | 3 | PLAYSTATION | 67 | -------------------------------------------------------------------------------- /docs/welcome_screen.md: -------------------------------------------------------------------------------- 1 | # Welcome Screen 2 | 3 | ## Get Welcome Screen 4 | 5 | **GET** `/guilds/{guild.id}/welcome-screen` 6 | 7 | Returns a [welcome screen object](https://discord.com/developers/docs/resources/guild#welcome-screen-object-welcome-screen-structure) or 204 No Content if there is none set
8 | 9 | ## Modify Welcome Screen 10 | 11 | **PATCH** `/guilds/{guild.id}/welcome-screen`
12 | Request body is a [welcome screen object](https://discord.com/developers/docs/resources/guild#welcome-screen-object-welcome-screen-structure)
13 | 14 | Returns a new [welcome screen object](https://discord.com/developers/docs/resources/guild#welcome-screen-object-welcome-screen-structure) on success
15 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: discord-undocumented 2 | 3 | theme: 4 | name: material 5 | palette: 6 | scheme: slate 7 | primary: purple 8 | 9 | extra_css: 10 | - stylesheets/extra.css 11 | 12 | nav: 13 | - index.md 14 | - Account: 15 | - account_verification.md 16 | - affinities.md 17 | - dms.md 18 | - Gateway: 19 | - capabilities.md 20 | - gateway_events.md 21 | - gateway_opcodes.md 22 | - ready_event.md 23 | - ready_supplemental.md 24 | - slash_commands.md 25 | - Guild: 26 | - create_guild.md 27 | - get_role_members.md 28 | - bulk_member_role.md 29 | - guild_avatars.md 30 | - guild_directories.md 31 | - guild_discovery.md 32 | - guild_lurking.md 33 | - join_leave_guild.md 34 | - manage_discovery_partnership.md 35 | - member_verification.md 36 | - modify_guild.md 37 | - role_member_counts.md 38 | - threads.md 39 | - update_guild_mfa_level.md 40 | - Message: 41 | - search.md 42 | - Other Topics: 43 | - remote_auth.md 44 | - User: 45 | - notes.md 46 | - profile.md 47 | - relationships.md 48 | - user_guild_settings.md 49 | - voice_channel_effects.md 50 | - welcome_screen.md 51 | - Voice: 52 | - voice_gateway_opcodes.md 53 | 54 | plugins: 55 | - search 56 | 57 | markdown_extensions: 58 | - admonition 59 | - pymdownx.details 60 | - pymdownx.superfences 61 | - pymdownx.tabbed: 62 | alternate_style: true 63 | 64 | --------------------------------------------------------------------------------