dfx 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +3 -0
- package/.prettierrc.json +4 -0
- package/DiscordREST/types.ts +5 -0
- package/DiscordWS/index.ts +0 -0
- package/WS/index.ts +122 -0
- package/discord-api-docs/.eslintrc.json +10 -0
- package/discord-api-docs/.gitattributes +11 -0
- package/discord-api-docs/.github/ISSUE_TEMPLATE/api-bug-report.yml +49 -0
- package/discord-api-docs/.github/ISSUE_TEMPLATE/config.yml +20 -0
- package/discord-api-docs/.github/ISSUE_TEMPLATE/developer-site-bug-report.yml +49 -0
- package/discord-api-docs/.github/ISSUE_TEMPLATE/message-components-bug-report.yml +49 -0
- package/discord-api-docs/.github/ISSUE_TEMPLATE/slash-command-bug-report.yml +49 -0
- package/discord-api-docs/.github/workflows/test.yaml +45 -0
- package/discord-api-docs/.prettierignore +1 -0
- package/discord-api-docs/.prettierrc.json +15 -0
- package/discord-api-docs/CODE_OF_CONDUCT.md +75 -0
- package/discord-api-docs/CONTRIBUTING.md +16 -0
- package/discord-api-docs/README.md +35 -0
- package/discord-api-docs/ci/checkLinks.ts +177 -0
- package/discord-api-docs/docs/Change_Log.md +474 -0
- package/discord-api-docs/docs/Intro.md +48 -0
- package/discord-api-docs/docs/Legal.md +154 -0
- package/discord-api-docs/docs/Policy.md +81 -0
- package/discord-api-docs/docs/Reference.md +476 -0
- package/discord-api-docs/docs/Store_Distribution_Agreement.md +179 -0
- package/discord-api-docs/docs/dispatch/Branches_and_Builds.md +654 -0
- package/discord-api-docs/docs/dispatch/Dispatch_and_You.md +17 -0
- package/discord-api-docs/docs/dispatch/Error_Codes.md +26 -0
- package/discord-api-docs/docs/dispatch/Field_Values.md +48 -0
- package/discord-api-docs/docs/dispatch/List_of_Commands.md +315 -0
- package/discord-api-docs/docs/game_and_server_management/Alpha_and_Beta_Testing.md +52 -0
- package/discord-api-docs/docs/game_and_server_management/How_to_Get_Your_Game_on_Discord.md +110 -0
- package/discord-api-docs/docs/game_and_server_management/Special_Channels.md +38 -0
- package/discord-api-docs/docs/game_sdk/Achievements.md +405 -0
- package/discord-api-docs/docs/game_sdk/Activities.md +561 -0
- package/discord-api-docs/docs/game_sdk/Applications.md +237 -0
- package/discord-api-docs/docs/game_sdk/Discord.md +443 -0
- package/discord-api-docs/docs/game_sdk/Discord_Voice.md +289 -0
- package/discord-api-docs/docs/game_sdk/Images.md +196 -0
- package/discord-api-docs/docs/game_sdk/Lobbies.md +1639 -0
- package/discord-api-docs/docs/game_sdk/Networking.md +377 -0
- package/discord-api-docs/docs/game_sdk/Overlay.md +195 -0
- package/discord-api-docs/docs/game_sdk/Relationships.md +234 -0
- package/discord-api-docs/docs/game_sdk/SDK_Starter_Guide.md +310 -0
- package/discord-api-docs/docs/game_sdk/Storage.md +312 -0
- package/discord-api-docs/docs/game_sdk/Store.md +555 -0
- package/discord-api-docs/docs/game_sdk/Users.md +178 -0
- package/discord-api-docs/docs/interactions/Application_Commands.md +1069 -0
- package/discord-api-docs/docs/interactions/Message_Components.md +454 -0
- package/discord-api-docs/docs/interactions/Receiving_and_Responding.md +372 -0
- package/discord-api-docs/docs/interactions/Slash_Commands.md +3 -0
- package/discord-api-docs/docs/resources/Application.md +82 -0
- package/discord-api-docs/docs/resources/Audit_Log.md +223 -0
- package/discord-api-docs/docs/resources/Channel.md +1267 -0
- package/discord-api-docs/docs/resources/Emoji.md +122 -0
- package/discord-api-docs/docs/resources/Guild.md +1157 -0
- package/discord-api-docs/docs/resources/Guild_Scheduled_Event.md +273 -0
- package/discord-api-docs/docs/resources/Guild_Template.md +148 -0
- package/discord-api-docs/docs/resources/Invite.md +150 -0
- package/discord-api-docs/docs/resources/Stage_Instance.md +106 -0
- package/discord-api-docs/docs/resources/Sticker.md +164 -0
- package/discord-api-docs/docs/resources/User.md +205 -0
- package/discord-api-docs/docs/resources/Voice.md +55 -0
- package/discord-api-docs/docs/resources/Webhook.md +281 -0
- package/discord-api-docs/docs/rich_presence/Best_Practices.md +88 -0
- package/discord-api-docs/docs/rich_presence/FAQ.md +45 -0
- package/discord-api-docs/docs/rich_presence/How_To.md +302 -0
- package/discord-api-docs/docs/rich_presence/Launch_Checklist.md +46 -0
- package/discord-api-docs/docs/topics/Certified_Devices.md +200 -0
- package/discord-api-docs/docs/topics/Community_Resources.md +98 -0
- package/discord-api-docs/docs/topics/Gateway.md +1600 -0
- package/discord-api-docs/docs/topics/OAuth2.md +427 -0
- package/discord-api-docs/docs/topics/Opcodes_and_Status_Codes.md +306 -0
- package/discord-api-docs/docs/topics/Permissions.md +229 -0
- package/discord-api-docs/docs/topics/RPC.md +1597 -0
- package/discord-api-docs/docs/topics/Rate_Limits.md +126 -0
- package/discord-api-docs/docs/topics/Teams.md +80 -0
- package/discord-api-docs/docs/topics/Threads.md +163 -0
- package/discord-api-docs/docs/topics/Voice_Connections.md +282 -0
- package/discord-api-docs/images/API_center.gif +0 -0
- package/discord-api-docs/images/ask-to-join.gif +0 -0
- package/discord-api-docs/images/available-published.png +0 -0
- package/discord-api-docs/images/button-styles.png +0 -0
- package/discord-api-docs/images/certified-device.png +0 -0
- package/discord-api-docs/images/command-with-groups-subcommands-parameters.png +0 -0
- package/discord-api-docs/images/command-with-groups-subcommands.png +0 -0
- package/discord-api-docs/images/command.png +0 -0
- package/discord-api-docs/images/cpp-files-sdk.png +0 -0
- package/discord-api-docs/images/create-store-channel.png +0 -0
- package/discord-api-docs/images/deferred-example.png +0 -0
- package/discord-api-docs/images/desktop-select.png +0 -0
- package/discord-api-docs/images/game-overlay-sdk-invite.gif +0 -0
- package/discord-api-docs/images/game-overlay-sdk-voice-settings.png +0 -0
- package/discord-api-docs/images/game-overlay-sdk-voice-widget.png +0 -0
- package/discord-api-docs/images/gift-code-creation.png +0 -0
- package/discord-api-docs/images/lib-linked-sdk.png +0 -0
- package/discord-api-docs/images/message-command.png +0 -0
- package/discord-api-docs/images/mobile-select.png +0 -0
- package/discord-api-docs/images/previous-new-server-background.png +0 -0
- package/discord-api-docs/images/rp-actionable.png +0 -0
- package/discord-api-docs/images/rp-all-fields.png +0 -0
- package/discord-api-docs/images/rp-bad-art.png +0 -0
- package/discord-api-docs/images/rp-good-art.png +0 -0
- package/discord-api-docs/images/rp-legend.png +0 -0
- package/discord-api-docs/images/rp-long-strings.png +0 -0
- package/discord-api-docs/images/rp-non-actionable.png +0 -0
- package/discord-api-docs/images/rp-not-all-fields.png +0 -0
- package/discord-api-docs/images/rp-profile-example-1.png +0 -0
- package/discord-api-docs/images/rp-profile-example-2.png +0 -0
- package/discord-api-docs/images/rp-short-strings.png +0 -0
- package/discord-api-docs/images/server-banner-example.png +0 -0
- package/discord-api-docs/images/server-banner-margin-top.png +0 -0
- package/discord-api-docs/images/sku-management.png +0 -0
- package/discord-api-docs/images/snowflake.png +0 -0
- package/discord-api-docs/images/snowflake_original_size.png +0 -0
- package/discord-api-docs/images/spectate.gif +0 -0
- package/discord-api-docs/images/team-2fa.png +0 -0
- package/discord-api-docs/images/team-make-app.png +0 -0
- package/discord-api-docs/images/team-page.png +0 -0
- package/discord-api-docs/images/transfer-app-to-team.png +0 -0
- package/discord-api-docs/images/user-command.png +0 -0
- package/discord-api-docs/package-lock.json +3186 -0
- package/discord-api-docs/package.json +38 -0
- package/discord-api-docs/tsconfig.eslint.json +4 -0
- package/discord-api-docs/tsconfig.json +19 -0
- package/mod.js +14 -0
- package/mod.ts +24 -0
- package/package.json +28 -0
- package/tsconfig.json +24 -0
- package/types.ts +5334 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Stage Instance Resource
|
|
2
|
+
|
|
3
|
+
A _Stage Instance_ holds information about a live stage.
|
|
4
|
+
|
|
5
|
+
### Stage Instance Object
|
|
6
|
+
|
|
7
|
+
###### Stage Instance Structure
|
|
8
|
+
|
|
9
|
+
| Field | Type | Description |
|
|
10
|
+
| ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| id | snowflake | The id of this Stage instance |
|
|
12
|
+
| guild_id | snowflake | The guild id of the associated Stage channel |
|
|
13
|
+
| channel_id | snowflake | The id of the associated Stage channel |
|
|
14
|
+
| topic | string | The topic of the Stage instance (1-120 characters) |
|
|
15
|
+
| privacy_level | integer | The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance |
|
|
16
|
+
| discoverable_disabled | boolean | Whether or not Stage Discovery is disabled (deprecated) |
|
|
17
|
+
| guild_scheduled_event_id | ?snowflake | The id of the scheduled event for this Stage instance |
|
|
18
|
+
|
|
19
|
+
###### Privacy Level
|
|
20
|
+
|
|
21
|
+
| Level | Value | Description |
|
|
22
|
+
| ---------- | ----- | ------------------------------------------------------------------- |
|
|
23
|
+
| PUBLIC | 1 | The Stage instance is visible publicly. (deprecated) |
|
|
24
|
+
| GUILD_ONLY | 2 | The Stage instance is visible to only guild members. |
|
|
25
|
+
|
|
26
|
+
###### Example Stage Instance
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"id": "840647391636226060",
|
|
31
|
+
"guild_id": "197038439483310086",
|
|
32
|
+
"channel_id": "733488538393510049",
|
|
33
|
+
"topic": "Testing Testing, 123",
|
|
34
|
+
"privacy_level": 1,
|
|
35
|
+
"discoverable_disabled": false,
|
|
36
|
+
"guild_scheduled_event_id": "947656305244532806"
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Definitions
|
|
41
|
+
|
|
42
|
+
Below are some definitions related to stages.
|
|
43
|
+
|
|
44
|
+
- **Liveness:** A Stage channel is considered _live_ when there is an associated stage instance. Conversely, a Stage channel is _not live_ when there is no associated stage instance.
|
|
45
|
+
- **Speakers:** A participant of a Stage channel is a _speaker_ when their [voice state](#DOCS_RESOURCES_VOICE/voice-state-object)
|
|
46
|
+
is not `suppress`ed, and has no `request_to_speak_timestamp`.
|
|
47
|
+
- **Moderators**: A member of the guild is a _moderator_ of a Stage channel if they have all of the following [permissions](#DOCS_TOPICS_PERMISSIONS/permissions):
|
|
48
|
+
- `MANAGE_CHANNELS`
|
|
49
|
+
- `MUTE_MEMBERS`
|
|
50
|
+
- `MOVE_MEMBERS`
|
|
51
|
+
- **Topic**: This is the blurb that gets shown below the channel's name, among other places.
|
|
52
|
+
- **Public**: A Stage instance is public when it has a `privacy_level` of `PUBLIC`. While a guild has a public Stage instance:
|
|
53
|
+
- The guild will be lurkable.
|
|
54
|
+
- Lurkers may join any Stage channel with a public Stage instance.
|
|
55
|
+
- Users in the Stage can have the Stage show in their [activities](#DOCS_TOPICS_GATEWAY/presence).
|
|
56
|
+
- [Invites](#DOCS_RESOURCES_INVITE/invite-object) to the Stage channel will have the `stage_instance` field.
|
|
57
|
+
|
|
58
|
+
## Auto Closing
|
|
59
|
+
|
|
60
|
+
When a Stage channel has no speakers for a certain period of time (on the order of minutes) it will be automatically deleted.
|
|
61
|
+
|
|
62
|
+
## Create Stage Instance % POST /stage-instances
|
|
63
|
+
|
|
64
|
+
Creates a new Stage instance associated to a Stage channel. Returns that [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-stage-instance-structure).
|
|
65
|
+
|
|
66
|
+
Requires the user to be a moderator of the Stage channel.
|
|
67
|
+
|
|
68
|
+
> info
|
|
69
|
+
> This endpoint supports the `X-Audit-Log-Reason` header.
|
|
70
|
+
|
|
71
|
+
###### JSON Params
|
|
72
|
+
|
|
73
|
+
| Field | Type | Description |
|
|
74
|
+
| -------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
75
|
+
| channel_id | snowflake | The id of the Stage channel |
|
|
76
|
+
| topic | string | The topic of the Stage instance (1-120 characters) |
|
|
77
|
+
| privacy_level? | integer | The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance (default GUILD_ONLY) |
|
|
78
|
+
|
|
79
|
+
## Get Stage Instance % GET /stage-instances/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}
|
|
80
|
+
|
|
81
|
+
Gets the stage instance associated with the Stage channel, if it exists.
|
|
82
|
+
|
|
83
|
+
## Modify Stage Instance % PATCH /stage-instances/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}
|
|
84
|
+
|
|
85
|
+
Updates fields of an existing Stage instance. Returns the updated [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-stage-instance-structure).
|
|
86
|
+
|
|
87
|
+
Requires the user to be a moderator of the Stage channel.
|
|
88
|
+
|
|
89
|
+
> info
|
|
90
|
+
> This endpoint supports the `X-Audit-Log-Reason` header.
|
|
91
|
+
|
|
92
|
+
###### JSON Params
|
|
93
|
+
|
|
94
|
+
| Field | Type | Description |
|
|
95
|
+
| -------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
|
|
96
|
+
| topic? | string | The topic of the Stage instance (1-120 characters) |
|
|
97
|
+
| privacy_level? | integer | The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance |
|
|
98
|
+
|
|
99
|
+
## Delete Stage Instance % DELETE /stage-instances/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}
|
|
100
|
+
|
|
101
|
+
Deletes the Stage instance. Returns `204 No Content`.
|
|
102
|
+
|
|
103
|
+
Requires the user to be a moderator of the Stage channel.
|
|
104
|
+
|
|
105
|
+
> info
|
|
106
|
+
> This endpoint supports the `X-Audit-Log-Reason` header.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Sticker Resource
|
|
2
|
+
|
|
3
|
+
### Sticker Object
|
|
4
|
+
|
|
5
|
+
Represents a sticker that can be sent in messages.
|
|
6
|
+
|
|
7
|
+
###### Sticker Structure
|
|
8
|
+
|
|
9
|
+
| Field | Type | Description |
|
|
10
|
+
| ----------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| id | snowflake | [id of the sticker](#DOCS_REFERENCE/image-formatting) |
|
|
12
|
+
| pack_id? | snowflake | for standard stickers, id of the pack the sticker is from |
|
|
13
|
+
| name | string | name of the sticker |
|
|
14
|
+
| description | ?string | description of the sticker |
|
|
15
|
+
| tags\* | string | autocomplete/suggestion tags for the sticker (max 200 characters) |
|
|
16
|
+
| asset? | string | **Deprecated** previously the sticker asset hash, now an empty string |
|
|
17
|
+
| type | integer | [type of sticker](#DOCS_RESOURCES_STICKER/sticker-object-sticker-types) |
|
|
18
|
+
| format_type | integer | [type of sticker format](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types) |
|
|
19
|
+
| available? | boolean | whether this guild sticker can be used, may be false due to loss of Server Boosts |
|
|
20
|
+
| guild_id? | snowflake | id of the guild that owns this sticker |
|
|
21
|
+
| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user that uploaded the guild sticker |
|
|
22
|
+
| sort_value? | integer | the standard sticker's sort order within its pack |
|
|
23
|
+
|
|
24
|
+
\* A comma separated list of keywords is the format used in this field by standard stickers, but this is just a convention.
|
|
25
|
+
Incidentally the client will always use a name generated from an emoji as the value of this field when creating or modifying a guild sticker.
|
|
26
|
+
|
|
27
|
+
###### Sticker Types
|
|
28
|
+
|
|
29
|
+
| Type | Value | Description |
|
|
30
|
+
| -------- | ----- | ----------------------------------------------------------------------------- |
|
|
31
|
+
| STANDARD | 1 | an official sticker in a pack, part of Nitro or in a removed purchasable pack |
|
|
32
|
+
| GUILD | 2 | a sticker uploaded to a Boosted guild for the guild's members |
|
|
33
|
+
|
|
34
|
+
###### Sticker Format Types
|
|
35
|
+
|
|
36
|
+
| Type | Value |
|
|
37
|
+
| ------ | ----- |
|
|
38
|
+
| PNG | 1 |
|
|
39
|
+
| APNG | 2 |
|
|
40
|
+
| LOTTIE | 3 |
|
|
41
|
+
|
|
42
|
+
###### Example Sticker
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"id": "749054660769218631",
|
|
47
|
+
"name": "Wave",
|
|
48
|
+
"tags": "wumpus, hello, sup, hi, oi, heyo, heya, yo, greetings, greet, welcome, wave, :wave, :hello, :hi, :hey, hey, \ud83d\udc4b, \ud83d\udc4b\ud83c\udffb, \ud83d\udc4b\ud83c\udffc, \ud83d\udc4b\ud83c\udffd, \ud83d\udc4b\ud83c\udffe, \ud83d\udc4b\ud83c\udfff, goodbye, bye, see ya, later, laterz, cya",
|
|
49
|
+
"type": 1,
|
|
50
|
+
"format_type": 3,
|
|
51
|
+
"description": "Wumpus waves hello",
|
|
52
|
+
"asset": "",
|
|
53
|
+
"pack_id": "847199849233514549",
|
|
54
|
+
"sort_value": 12
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Sticker Item Object
|
|
59
|
+
|
|
60
|
+
The smallest amount of data required to render a sticker. A partial sticker object.
|
|
61
|
+
|
|
62
|
+
###### Sticker Item Structure
|
|
63
|
+
|
|
64
|
+
| Field | Type | Description |
|
|
65
|
+
| ----------- | --------- | ------------------------------------------------------------------------------------- |
|
|
66
|
+
| id | snowflake | id of the sticker |
|
|
67
|
+
| name | string | name of the sticker |
|
|
68
|
+
| format_type | integer | [type of sticker format](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types) |
|
|
69
|
+
|
|
70
|
+
### Sticker Pack Object
|
|
71
|
+
|
|
72
|
+
Represents a pack of standard stickers.
|
|
73
|
+
|
|
74
|
+
###### Sticker Pack Structure
|
|
75
|
+
|
|
76
|
+
| Field | Type | Description |
|
|
77
|
+
| ---------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
|
78
|
+
| id | snowflake | id of the sticker pack |
|
|
79
|
+
| stickers | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | the stickers in the pack |
|
|
80
|
+
| name | string | name of the sticker pack |
|
|
81
|
+
| sku_id | snowflake | id of the pack's SKU |
|
|
82
|
+
| cover_sticker_id? | snowflake | id of a sticker in the pack which is shown as the pack's icon |
|
|
83
|
+
| description | string | description of the sticker pack |
|
|
84
|
+
| banner_asset_id? | snowflake | id of the sticker pack's [banner image](#DOCS_REFERENCE/image-formatting) |
|
|
85
|
+
|
|
86
|
+
###### Example Sticker Pack
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"id": "847199849233514549",
|
|
91
|
+
"stickers": [],
|
|
92
|
+
"name": "Wumpus Beyond",
|
|
93
|
+
"sku_id": "847199849233514547",
|
|
94
|
+
"cover_sticker_id": "749053689419006003",
|
|
95
|
+
"description": "Say hello to Wumpus!",
|
|
96
|
+
"banner_asset_id": "761773777976819732"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Get Sticker % GET /stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object}
|
|
101
|
+
|
|
102
|
+
Returns a [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object for the given sticker ID.
|
|
103
|
+
|
|
104
|
+
## List Nitro Sticker Packs % GET /sticker-packs
|
|
105
|
+
|
|
106
|
+
Returns the list of sticker packs available to Nitro subscribers.
|
|
107
|
+
|
|
108
|
+
###### Response Structure
|
|
109
|
+
|
|
110
|
+
| Field | Type |
|
|
111
|
+
| ------------- | ---------------------------------------------------------------------------- |
|
|
112
|
+
| sticker_packs | array of [sticker pack](#DOCS_RESOURCES_STICKER/sticker-pack-object) objects |
|
|
113
|
+
|
|
114
|
+
## List Guild Stickers % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers
|
|
115
|
+
|
|
116
|
+
Returns an array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects for the given guild. Includes `user` fields if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
117
|
+
|
|
118
|
+
## Get Guild Sticker % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object}
|
|
119
|
+
|
|
120
|
+
Returns a [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object for the given guild and sticker IDs. Includes the `user` field if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
121
|
+
|
|
122
|
+
## Create Guild Sticker % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers
|
|
123
|
+
|
|
124
|
+
Create a new sticker for the guild. Send a `multipart/form-data` body. Requires the `MANAGE_EMOJIS_AND_STICKERS` permission. Returns the new [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object on success.
|
|
125
|
+
|
|
126
|
+
> info
|
|
127
|
+
> This endpoint supports the `X-Audit-Log-Reason` header.
|
|
128
|
+
|
|
129
|
+
> warn
|
|
130
|
+
> Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features).
|
|
131
|
+
|
|
132
|
+
###### Form Params
|
|
133
|
+
|
|
134
|
+
| Field | Type | Description |
|
|
135
|
+
| ----------- | ------------- | -------------------------------------------------------------------------------------------- |
|
|
136
|
+
| name | string | name of the sticker (2-30 characters) |
|
|
137
|
+
| description | string | description of the sticker (empty or 2-100 characters) |
|
|
138
|
+
| tags | string | autocomplete/suggestion tags for the sticker (max 200 characters) |
|
|
139
|
+
| file | file contents | the sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB |
|
|
140
|
+
|
|
141
|
+
## Modify Guild Sticker % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object}
|
|
142
|
+
|
|
143
|
+
Modify the given sticker. Requires the `MANAGE_EMOJIS_AND_STICKERS` permission. Returns the updated [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object on success.
|
|
144
|
+
|
|
145
|
+
> info
|
|
146
|
+
> All parameters to this endpoint are optional.
|
|
147
|
+
|
|
148
|
+
> info
|
|
149
|
+
> This endpoint supports the `X-Audit-Log-Reason` header.
|
|
150
|
+
|
|
151
|
+
###### JSON Params
|
|
152
|
+
|
|
153
|
+
| Field | Type | Description |
|
|
154
|
+
| ----------- | ------- | -------------------------------------------------------------------------------------------- |
|
|
155
|
+
| name | string | name of the sticker (2-30 characters) |
|
|
156
|
+
| description | ?string | description of the sticker (2-100 characters) |
|
|
157
|
+
| tags | string | autocomplete/suggestion tags for the sticker (max 200 characters) |
|
|
158
|
+
|
|
159
|
+
## Delete Guild Sticker % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object}
|
|
160
|
+
|
|
161
|
+
Delete the given sticker. Requires the `MANAGE_EMOJIS_AND_STICKERS` permission. Returns `204 No Content` on success.
|
|
162
|
+
|
|
163
|
+
> info
|
|
164
|
+
> This endpoint supports the `X-Audit-Log-Reason` header.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Users Resource
|
|
2
|
+
|
|
3
|
+
Users in Discord are generally considered the base entity. Users can spawn across the entire platform, be members of
|
|
4
|
+
guilds, participate in text and voice chat, and much more. Users are separated by a distinction of "bot" vs "normal." Although they are similar, bot users are automated users that are "owned" by another user. Unlike normal users, bot users do
|
|
5
|
+
_not_ have a limitation on the number of Guilds they can be a part of.
|
|
6
|
+
|
|
7
|
+
## Usernames and Nicknames
|
|
8
|
+
|
|
9
|
+
Discord enforces the following restrictions for usernames and nicknames:
|
|
10
|
+
|
|
11
|
+
1. Names can contain most valid unicode characters. We limit some zero-width and non-rendering characters.
|
|
12
|
+
2. Usernames must be between 2 and 32 characters long.
|
|
13
|
+
3. Nicknames must be between 1 and 32 characters long.
|
|
14
|
+
4. Names are sanitized and trimmed of leading, trailing, and excessive internal whitespace.
|
|
15
|
+
|
|
16
|
+
The following restrictions are additionally enforced for usernames:
|
|
17
|
+
|
|
18
|
+
1. Usernames cannot contain the following substrings: '@', '#', ':', '\```', 'discord'
|
|
19
|
+
2. Usernames cannot be: 'everyone', 'here'
|
|
20
|
+
|
|
21
|
+
There are other rules and restrictions not shared here for the sake of spam and abuse mitigation, but the majority of users won't encounter them. It's important to properly handle all error messages returned by Discord when editing or updating names.
|
|
22
|
+
|
|
23
|
+
### User Object
|
|
24
|
+
|
|
25
|
+
###### User Structure
|
|
26
|
+
|
|
27
|
+
| Field | Type | Description | Required OAuth2 Scope |
|
|
28
|
+
| ------------- | --------- | ---------------------------------------------------------------------------------------------------- | --------------------- |
|
|
29
|
+
| id | snowflake | the user's id | identify |
|
|
30
|
+
| username | string | the user's username, not unique across the platform | identify |
|
|
31
|
+
| discriminator | string | the user's 4-digit discord-tag | identify |
|
|
32
|
+
| avatar | ?string | the user's [avatar hash](#DOCS_REFERENCE/image-formatting) | identify |
|
|
33
|
+
| bot? | boolean | whether the user belongs to an OAuth2 application | identify |
|
|
34
|
+
| system? | boolean | whether the user is an Official Discord System user (part of the urgent message system) | identify |
|
|
35
|
+
| mfa_enabled? | boolean | whether the user has two factor enabled on their account | identify |
|
|
36
|
+
| banner? | ?string | the user's [banner hash](#DOCS_REFERENCE/image-formatting) | identify |
|
|
37
|
+
| accent_color? | ?integer | the user's banner color encoded as an integer representation of hexadecimal color code | identify |
|
|
38
|
+
| locale? | string | the user's chosen [language option](#DOCS_REFERENCE/locales) | identify |
|
|
39
|
+
| verified? | boolean | whether the email on this account has been verified | email |
|
|
40
|
+
| email? | ?string | the user's email | email |
|
|
41
|
+
| flags? | integer | the [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify |
|
|
42
|
+
| premium_type? | integer | the [type of Nitro subscription](#DOCS_RESOURCES_USER/user-object-premium-types) on a user's account | identify |
|
|
43
|
+
| public_flags? | integer | the public [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify |
|
|
44
|
+
|
|
45
|
+
###### Example User
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"id": "80351110224678912",
|
|
50
|
+
"username": "Nelly",
|
|
51
|
+
"discriminator": "1337",
|
|
52
|
+
"avatar": "8342729096ea3675442027381ff50dfe",
|
|
53
|
+
"verified": true,
|
|
54
|
+
"email": "nelly@discord.com",
|
|
55
|
+
"flags": 64,
|
|
56
|
+
"banner": "06c16474723fe537c283b8efa61a30c8",
|
|
57
|
+
"accent_color": 16711680,
|
|
58
|
+
"premium_type": 1,
|
|
59
|
+
"public_flags": 64
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
###### User Flags
|
|
64
|
+
|
|
65
|
+
| Value | Name | Description |
|
|
66
|
+
| ------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| 0 | None | None |
|
|
68
|
+
| 1 << 0 | STAFF | Discord Employee |
|
|
69
|
+
| 1 << 1 | PARTNER | Partnered Server Owner |
|
|
70
|
+
| 1 << 2 | HYPESQUAD | HypeSquad Events Coordinator |
|
|
71
|
+
| 1 << 3 | BUG_HUNTER_LEVEL_1 | Bug Hunter Level 1 |
|
|
72
|
+
| 1 << 6 | HYPESQUAD_ONLINE_HOUSE_1 | House Bravery Member |
|
|
73
|
+
| 1 << 7 | HYPESQUAD_ONLINE_HOUSE_2 | House Brilliance Member |
|
|
74
|
+
| 1 << 8 | HYPESQUAD_ONLINE_HOUSE_3 | House Balance Member |
|
|
75
|
+
| 1 << 9 | PREMIUM_EARLY_SUPPORTER | Early Nitro Supporter |
|
|
76
|
+
| 1 << 10 | TEAM_PSEUDO_USER | User is a [team](#DOCS_TOPICS_TEAMS/) |
|
|
77
|
+
| 1 << 14 | BUG_HUNTER_LEVEL_2 | Bug Hunter Level 2 |
|
|
78
|
+
| 1 << 16 | VERIFIED_BOT | Verified Bot |
|
|
79
|
+
| 1 << 17 | VERIFIED_DEVELOPER | Early Verified Bot Developer |
|
|
80
|
+
| 1 << 18 | CERTIFIED_MODERATOR | Discord Certified Moderator |
|
|
81
|
+
| 1 << 19 | BOT_HTTP_INTERACTIONS | Bot uses only [HTTP interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) and is shown in the online member list |
|
|
82
|
+
|
|
83
|
+
###### Premium Types
|
|
84
|
+
|
|
85
|
+
Premium types denote the level of premium a user has. Visit the [Nitro](https://discord.com/nitro) page to learn more about the premium plans we currently offer.
|
|
86
|
+
|
|
87
|
+
| Value | Name |
|
|
88
|
+
| ----- | ------------- |
|
|
89
|
+
| 0 | None |
|
|
90
|
+
| 1 | Nitro Classic |
|
|
91
|
+
| 2 | Nitro |
|
|
92
|
+
|
|
93
|
+
### Connection Object
|
|
94
|
+
|
|
95
|
+
The connection object that the user has attached.
|
|
96
|
+
|
|
97
|
+
###### Connection Structure
|
|
98
|
+
|
|
99
|
+
| Field | Type | Description |
|
|
100
|
+
| ------------- | ------- | ---------------------------------------------------------------------------------------- |
|
|
101
|
+
| id | string | id of the connection account |
|
|
102
|
+
| name | string | the username of the connection account |
|
|
103
|
+
| type | string | the service of the connection (twitch, youtube) |
|
|
104
|
+
| revoked? | boolean | whether the connection is revoked |
|
|
105
|
+
| integrations? | array | an array of partial [server integrations](#DOCS_RESOURCES_GUILD/integration-object) |
|
|
106
|
+
| verified | boolean | whether the connection is verified |
|
|
107
|
+
| friend_sync | boolean | whether friend sync is enabled for this connection |
|
|
108
|
+
| show_activity | boolean | whether activities related to this connection will be shown in presence updates |
|
|
109
|
+
| visibility | integer | [visibility](#DOCS_RESOURCES_USER/connection-object-visibility-types) of this connection |
|
|
110
|
+
|
|
111
|
+
###### Visibility Types
|
|
112
|
+
|
|
113
|
+
| Value | Name | Description |
|
|
114
|
+
| ----- | -------- | ------------------------------------------------ |
|
|
115
|
+
| 0 | None | invisible to everyone except the user themselves |
|
|
116
|
+
| 1 | Everyone | visible to everyone |
|
|
117
|
+
|
|
118
|
+
## Get Current User % GET /users/@me
|
|
119
|
+
|
|
120
|
+
Returns the [user](#DOCS_RESOURCES_USER/user-object) 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.
|
|
121
|
+
|
|
122
|
+
## Get User % GET /users/{user.id#DOCS_RESOURCES_USER/user-object}
|
|
123
|
+
|
|
124
|
+
Returns a [user](#DOCS_RESOURCES_USER/user-object) object for a given user ID.
|
|
125
|
+
|
|
126
|
+
## Modify Current User % PATCH /users/@me
|
|
127
|
+
|
|
128
|
+
Modify the requester's user account settings. Returns a [user](#DOCS_RESOURCES_USER/user-object) object on success.
|
|
129
|
+
|
|
130
|
+
> info
|
|
131
|
+
> All parameters to this endpoint are optional.
|
|
132
|
+
|
|
133
|
+
###### JSON Params
|
|
134
|
+
|
|
135
|
+
| Field | Type | Description |
|
|
136
|
+
| -------- | ----------------------------------------- | -------------------------------------------------------------------------------- |
|
|
137
|
+
| username | string | user's username, if changed may cause the user's discriminator to be randomized. |
|
|
138
|
+
| avatar | ?[image data](#DOCS_REFERENCE/image-data) | if passed, modifies the user's avatar |
|
|
139
|
+
|
|
140
|
+
## Get Current User Guilds % GET /users/@me/guilds
|
|
141
|
+
|
|
142
|
+
Returns a list of partial [guild](#DOCS_RESOURCES_GUILD/guild-object) objects the current user is a member of. Requires the `guilds` OAuth2 scope.
|
|
143
|
+
|
|
144
|
+
###### Example Partial Guild
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"id": "80351110224678912",
|
|
149
|
+
"name": "1337 Krew",
|
|
150
|
+
"icon": "8342729096ea3675442027381ff50dfe",
|
|
151
|
+
"owner": true,
|
|
152
|
+
"permissions": "36953089",
|
|
153
|
+
"features": ["COMMUNITY", "NEWS"]
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
> info
|
|
158
|
+
> This endpoint returns 200 guilds by default, which is the maximum number of guilds a non-bot user can join. Therefore, pagination is **not needed** for integrations that need to get a list of the users' guilds.
|
|
159
|
+
|
|
160
|
+
###### Query String Params
|
|
161
|
+
|
|
162
|
+
| Field | Type | Description | Required | Default |
|
|
163
|
+
| ------ | --------- | -------------------------------------- | -------- | ------- |
|
|
164
|
+
| before | snowflake | get guilds before this guild ID | false | absent |
|
|
165
|
+
| after | snowflake | get guilds after this guild ID | false | absent |
|
|
166
|
+
| limit | integer | max number of guilds to return (1-200) | false | 200 |
|
|
167
|
+
|
|
168
|
+
## Get Current User Guild Member % GET /users/@me/guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/member
|
|
169
|
+
|
|
170
|
+
Returns a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object for the current user. Requires the `guilds.members.read` OAuth2 scope.
|
|
171
|
+
|
|
172
|
+
## Leave Guild % DELETE /users/@me/guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}
|
|
173
|
+
|
|
174
|
+
Leave a guild. Returns a 204 empty response on success.
|
|
175
|
+
|
|
176
|
+
## Create DM % POST /users/@me/channels
|
|
177
|
+
|
|
178
|
+
Create a new DM channel with a user. Returns a [DM channel](#DOCS_RESOURCES_CHANNEL/channel-object) object.
|
|
179
|
+
|
|
180
|
+
> warn
|
|
181
|
+
> You should not use this endpoint to DM everyone in a server about something. DMs should generally be initiated by a user action. If you open a significant amount of DMs too quickly, your bot may be rate limited or blocked from opening new ones.
|
|
182
|
+
|
|
183
|
+
###### JSON Params
|
|
184
|
+
|
|
185
|
+
| Field | Type | Description |
|
|
186
|
+
| ------------ | --------- | --------------------------------------- |
|
|
187
|
+
| recipient_id | snowflake | the recipient to open a DM channel with |
|
|
188
|
+
|
|
189
|
+
## Create Group DM % POST /users/@me/channels
|
|
190
|
+
|
|
191
|
+
Create a new group DM channel with multiple users. Returns a [DM channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client
|
|
192
|
+
|
|
193
|
+
> warn
|
|
194
|
+
> This endpoint is limited to 10 active group DMs.
|
|
195
|
+
|
|
196
|
+
###### JSON Params
|
|
197
|
+
|
|
198
|
+
| Field | Type | Description |
|
|
199
|
+
| ------------- | ---------------- | ---------------------------------------------------------------------- |
|
|
200
|
+
| access_tokens | array of strings | access tokens of users that have granted your app the `gdm.join` scope |
|
|
201
|
+
| nicks | dict | a dictionary of user ids to their respective nicknames |
|
|
202
|
+
|
|
203
|
+
## Get User Connections % GET /users/@me/connections
|
|
204
|
+
|
|
205
|
+
Returns a list of [connection](#DOCS_RESOURCES_USER/connection-object) objects. Requires the `connections` OAuth2 scope.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Voice Resource
|
|
2
|
+
|
|
3
|
+
### Voice State Object
|
|
4
|
+
|
|
5
|
+
Used to represent a user's voice connection status.
|
|
6
|
+
|
|
7
|
+
###### Voice State Structure
|
|
8
|
+
|
|
9
|
+
| Field | Type | Description |
|
|
10
|
+
| -------------------------- | ---------------------------------------------------------------- | ---------------------------------------------- |
|
|
11
|
+
| guild_id? | snowflake | the guild id this voice state is for |
|
|
12
|
+
| channel_id | ?snowflake | the channel id this user is connected to |
|
|
13
|
+
| user_id | snowflake | the user id this voice state is for |
|
|
14
|
+
| member? | [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object | the guild member this voice state is for |
|
|
15
|
+
| session_id | string | the session id for this voice state |
|
|
16
|
+
| deaf | boolean | whether this user is deafened by the server |
|
|
17
|
+
| mute | boolean | whether this user is muted by the server |
|
|
18
|
+
| self_deaf | boolean | whether this user is locally deafened |
|
|
19
|
+
| self_mute | boolean | whether this user is locally muted |
|
|
20
|
+
| self_stream? | boolean | whether this user is streaming using "Go Live" |
|
|
21
|
+
| self_video | boolean | whether this user's camera is enabled |
|
|
22
|
+
| suppress | boolean | whether this user is muted by the current user |
|
|
23
|
+
| request_to_speak_timestamp | ?ISO8601 timestamp | the time at which the user requested to speak |
|
|
24
|
+
|
|
25
|
+
###### Example Voice State
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"channel_id": "157733188964188161",
|
|
30
|
+
"user_id": "80351110224678912",
|
|
31
|
+
"session_id": "90326bd25d71d39b9ef95b299e3872ff",
|
|
32
|
+
"deaf": false,
|
|
33
|
+
"mute": false,
|
|
34
|
+
"self_deaf": false,
|
|
35
|
+
"self_mute": true,
|
|
36
|
+
"suppress": false,
|
|
37
|
+
"request_to_speak_timestamp": "2021-03-31T18:45:31.297561+00:00"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Voice Region Object
|
|
42
|
+
|
|
43
|
+
###### Voice Region Structure
|
|
44
|
+
|
|
45
|
+
| Field | Type | Description |
|
|
46
|
+
| ---------- | ------- | --------------------------------------------------------------------- |
|
|
47
|
+
| id | string | unique ID for the region |
|
|
48
|
+
| name | string | name of the region |
|
|
49
|
+
| optimal | boolean | true for a single server that is closest to the current user's client |
|
|
50
|
+
| deprecated | boolean | whether this is a deprecated voice region (avoid switching to these) |
|
|
51
|
+
| custom | boolean | whether this is a custom voice region (used for events/etc) |
|
|
52
|
+
|
|
53
|
+
## List Voice Regions % GET /voice/regions
|
|
54
|
+
|
|
55
|
+
Returns an array of [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) objects that can be used when setting a voice or stage channel's [`rtc_region`](#DOCS_RESOURCES_CHANNEL/channel-object-channel-structure).
|