dfx 0.0.1 → 0.0.4

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.
Files changed (162) hide show
  1. package/DiscordREST/types.js +6 -0
  2. package/DiscordREST/types.js.map +1 -0
  3. package/DiscordShard/commands.js +38 -0
  4. package/DiscordShard/commands.js.map +1 -0
  5. package/DiscordShard/commands.ts +40 -0
  6. package/DiscordShard/heartbeats.js +33 -0
  7. package/DiscordShard/heartbeats.js.map +1 -0
  8. package/DiscordShard/heartbeats.ts +70 -0
  9. package/DiscordShard/identify.js +35 -0
  10. package/DiscordShard/identify.js.map +1 -0
  11. package/DiscordShard/identify.ts +76 -0
  12. package/DiscordShard/index.js +60 -0
  13. package/DiscordShard/index.js.map +1 -0
  14. package/DiscordShard/index.ts +110 -0
  15. package/DiscordShard/invalidSession.js +17 -0
  16. package/DiscordShard/invalidSession.js.map +1 -0
  17. package/DiscordShard/invalidSession.ts +25 -0
  18. package/DiscordShard/utils.js +24 -0
  19. package/DiscordShard/utils.js.map +1 -0
  20. package/DiscordShard/utils.ts +47 -0
  21. package/DiscordWS/index.js +37 -0
  22. package/DiscordWS/index.js.map +1 -0
  23. package/DiscordWS/index.ts +79 -0
  24. package/Log/index.js +19 -0
  25. package/Log/index.js.map +1 -0
  26. package/Log/index.ts +20 -0
  27. package/README.md +3 -0
  28. package/WS/index.js +70 -0
  29. package/WS/index.js.map +1 -0
  30. package/WS/index.ts +19 -27
  31. package/bot.js +33 -0
  32. package/bot.js.map +1 -0
  33. package/bot.ts +51 -0
  34. package/mod.js +5 -7
  35. package/mod.js.map +1 -0
  36. package/mod.ts +6 -22
  37. package/package.json +25 -2
  38. package/types.js +1563 -0
  39. package/types.js.map +1 -0
  40. package/.gitmodules +0 -3
  41. package/.prettierrc.json +0 -4
  42. package/discord-api-docs/.eslintrc.json +0 -10
  43. package/discord-api-docs/.gitattributes +0 -11
  44. package/discord-api-docs/.github/ISSUE_TEMPLATE/api-bug-report.yml +0 -49
  45. package/discord-api-docs/.github/ISSUE_TEMPLATE/config.yml +0 -20
  46. package/discord-api-docs/.github/ISSUE_TEMPLATE/developer-site-bug-report.yml +0 -49
  47. package/discord-api-docs/.github/ISSUE_TEMPLATE/message-components-bug-report.yml +0 -49
  48. package/discord-api-docs/.github/ISSUE_TEMPLATE/slash-command-bug-report.yml +0 -49
  49. package/discord-api-docs/.github/workflows/test.yaml +0 -45
  50. package/discord-api-docs/.prettierignore +0 -1
  51. package/discord-api-docs/.prettierrc.json +0 -15
  52. package/discord-api-docs/CODE_OF_CONDUCT.md +0 -75
  53. package/discord-api-docs/CONTRIBUTING.md +0 -16
  54. package/discord-api-docs/README.md +0 -35
  55. package/discord-api-docs/ci/checkLinks.ts +0 -177
  56. package/discord-api-docs/docs/Change_Log.md +0 -474
  57. package/discord-api-docs/docs/Intro.md +0 -48
  58. package/discord-api-docs/docs/Legal.md +0 -154
  59. package/discord-api-docs/docs/Policy.md +0 -81
  60. package/discord-api-docs/docs/Reference.md +0 -476
  61. package/discord-api-docs/docs/Store_Distribution_Agreement.md +0 -179
  62. package/discord-api-docs/docs/dispatch/Branches_and_Builds.md +0 -654
  63. package/discord-api-docs/docs/dispatch/Dispatch_and_You.md +0 -17
  64. package/discord-api-docs/docs/dispatch/Error_Codes.md +0 -26
  65. package/discord-api-docs/docs/dispatch/Field_Values.md +0 -48
  66. package/discord-api-docs/docs/dispatch/List_of_Commands.md +0 -315
  67. package/discord-api-docs/docs/game_and_server_management/Alpha_and_Beta_Testing.md +0 -52
  68. package/discord-api-docs/docs/game_and_server_management/How_to_Get_Your_Game_on_Discord.md +0 -110
  69. package/discord-api-docs/docs/game_and_server_management/Special_Channels.md +0 -38
  70. package/discord-api-docs/docs/game_sdk/Achievements.md +0 -405
  71. package/discord-api-docs/docs/game_sdk/Activities.md +0 -561
  72. package/discord-api-docs/docs/game_sdk/Applications.md +0 -237
  73. package/discord-api-docs/docs/game_sdk/Discord.md +0 -443
  74. package/discord-api-docs/docs/game_sdk/Discord_Voice.md +0 -289
  75. package/discord-api-docs/docs/game_sdk/Images.md +0 -196
  76. package/discord-api-docs/docs/game_sdk/Lobbies.md +0 -1639
  77. package/discord-api-docs/docs/game_sdk/Networking.md +0 -377
  78. package/discord-api-docs/docs/game_sdk/Overlay.md +0 -195
  79. package/discord-api-docs/docs/game_sdk/Relationships.md +0 -234
  80. package/discord-api-docs/docs/game_sdk/SDK_Starter_Guide.md +0 -310
  81. package/discord-api-docs/docs/game_sdk/Storage.md +0 -312
  82. package/discord-api-docs/docs/game_sdk/Store.md +0 -555
  83. package/discord-api-docs/docs/game_sdk/Users.md +0 -178
  84. package/discord-api-docs/docs/interactions/Application_Commands.md +0 -1069
  85. package/discord-api-docs/docs/interactions/Message_Components.md +0 -454
  86. package/discord-api-docs/docs/interactions/Receiving_and_Responding.md +0 -372
  87. package/discord-api-docs/docs/interactions/Slash_Commands.md +0 -3
  88. package/discord-api-docs/docs/resources/Application.md +0 -82
  89. package/discord-api-docs/docs/resources/Audit_Log.md +0 -223
  90. package/discord-api-docs/docs/resources/Channel.md +0 -1267
  91. package/discord-api-docs/docs/resources/Emoji.md +0 -122
  92. package/discord-api-docs/docs/resources/Guild.md +0 -1157
  93. package/discord-api-docs/docs/resources/Guild_Scheduled_Event.md +0 -273
  94. package/discord-api-docs/docs/resources/Guild_Template.md +0 -148
  95. package/discord-api-docs/docs/resources/Invite.md +0 -150
  96. package/discord-api-docs/docs/resources/Stage_Instance.md +0 -106
  97. package/discord-api-docs/docs/resources/Sticker.md +0 -164
  98. package/discord-api-docs/docs/resources/User.md +0 -205
  99. package/discord-api-docs/docs/resources/Voice.md +0 -55
  100. package/discord-api-docs/docs/resources/Webhook.md +0 -281
  101. package/discord-api-docs/docs/rich_presence/Best_Practices.md +0 -88
  102. package/discord-api-docs/docs/rich_presence/FAQ.md +0 -45
  103. package/discord-api-docs/docs/rich_presence/How_To.md +0 -302
  104. package/discord-api-docs/docs/rich_presence/Launch_Checklist.md +0 -46
  105. package/discord-api-docs/docs/topics/Certified_Devices.md +0 -200
  106. package/discord-api-docs/docs/topics/Community_Resources.md +0 -98
  107. package/discord-api-docs/docs/topics/Gateway.md +0 -1600
  108. package/discord-api-docs/docs/topics/OAuth2.md +0 -427
  109. package/discord-api-docs/docs/topics/Opcodes_and_Status_Codes.md +0 -306
  110. package/discord-api-docs/docs/topics/Permissions.md +0 -229
  111. package/discord-api-docs/docs/topics/RPC.md +0 -1597
  112. package/discord-api-docs/docs/topics/Rate_Limits.md +0 -126
  113. package/discord-api-docs/docs/topics/Teams.md +0 -80
  114. package/discord-api-docs/docs/topics/Threads.md +0 -163
  115. package/discord-api-docs/docs/topics/Voice_Connections.md +0 -282
  116. package/discord-api-docs/images/API_center.gif +0 -0
  117. package/discord-api-docs/images/ask-to-join.gif +0 -0
  118. package/discord-api-docs/images/available-published.png +0 -0
  119. package/discord-api-docs/images/button-styles.png +0 -0
  120. package/discord-api-docs/images/certified-device.png +0 -0
  121. package/discord-api-docs/images/command-with-groups-subcommands-parameters.png +0 -0
  122. package/discord-api-docs/images/command-with-groups-subcommands.png +0 -0
  123. package/discord-api-docs/images/command.png +0 -0
  124. package/discord-api-docs/images/cpp-files-sdk.png +0 -0
  125. package/discord-api-docs/images/create-store-channel.png +0 -0
  126. package/discord-api-docs/images/deferred-example.png +0 -0
  127. package/discord-api-docs/images/desktop-select.png +0 -0
  128. package/discord-api-docs/images/game-overlay-sdk-invite.gif +0 -0
  129. package/discord-api-docs/images/game-overlay-sdk-voice-settings.png +0 -0
  130. package/discord-api-docs/images/game-overlay-sdk-voice-widget.png +0 -0
  131. package/discord-api-docs/images/gift-code-creation.png +0 -0
  132. package/discord-api-docs/images/lib-linked-sdk.png +0 -0
  133. package/discord-api-docs/images/message-command.png +0 -0
  134. package/discord-api-docs/images/mobile-select.png +0 -0
  135. package/discord-api-docs/images/previous-new-server-background.png +0 -0
  136. package/discord-api-docs/images/rp-actionable.png +0 -0
  137. package/discord-api-docs/images/rp-all-fields.png +0 -0
  138. package/discord-api-docs/images/rp-bad-art.png +0 -0
  139. package/discord-api-docs/images/rp-good-art.png +0 -0
  140. package/discord-api-docs/images/rp-legend.png +0 -0
  141. package/discord-api-docs/images/rp-long-strings.png +0 -0
  142. package/discord-api-docs/images/rp-non-actionable.png +0 -0
  143. package/discord-api-docs/images/rp-not-all-fields.png +0 -0
  144. package/discord-api-docs/images/rp-profile-example-1.png +0 -0
  145. package/discord-api-docs/images/rp-profile-example-2.png +0 -0
  146. package/discord-api-docs/images/rp-short-strings.png +0 -0
  147. package/discord-api-docs/images/server-banner-example.png +0 -0
  148. package/discord-api-docs/images/server-banner-margin-top.png +0 -0
  149. package/discord-api-docs/images/sku-management.png +0 -0
  150. package/discord-api-docs/images/snowflake.png +0 -0
  151. package/discord-api-docs/images/snowflake_original_size.png +0 -0
  152. package/discord-api-docs/images/spectate.gif +0 -0
  153. package/discord-api-docs/images/team-2fa.png +0 -0
  154. package/discord-api-docs/images/team-make-app.png +0 -0
  155. package/discord-api-docs/images/team-page.png +0 -0
  156. package/discord-api-docs/images/transfer-app-to-team.png +0 -0
  157. package/discord-api-docs/images/user-command.png +0 -0
  158. package/discord-api-docs/package-lock.json +0 -3186
  159. package/discord-api-docs/package.json +0 -38
  160. package/discord-api-docs/tsconfig.eslint.json +0 -4
  161. package/discord-api-docs/tsconfig.json +0 -19
  162. package/tsconfig.json +0 -24
@@ -1,106 +0,0 @@
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.
@@ -1,164 +0,0 @@
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.
@@ -1,205 +0,0 @@
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.
@@ -1,55 +0,0 @@
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).