dfx 0.0.1 → 0.0.2

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 (136) hide show
  1. package/DiscordREST/types.js +6 -0
  2. package/DiscordREST/types.js.map +1 -0
  3. package/DiscordWS/index.js +2 -0
  4. package/DiscordWS/index.js.map +1 -0
  5. package/README.md +3 -0
  6. package/WS/index.js +71 -0
  7. package/WS/index.js.map +1 -0
  8. package/discord-api-docs/index.js +1 -0
  9. package/mod.js.map +1 -0
  10. package/package.json +6 -1
  11. package/types.js +1563 -0
  12. package/types.js.map +1 -0
  13. package/websocket.js +11 -0
  14. package/websocket.js.map +1 -0
  15. package/.gitmodules +0 -3
  16. package/.prettierrc.json +0 -4
  17. package/discord-api-docs/.eslintrc.json +0 -10
  18. package/discord-api-docs/.gitattributes +0 -11
  19. package/discord-api-docs/.github/ISSUE_TEMPLATE/api-bug-report.yml +0 -49
  20. package/discord-api-docs/.github/ISSUE_TEMPLATE/config.yml +0 -20
  21. package/discord-api-docs/.github/ISSUE_TEMPLATE/developer-site-bug-report.yml +0 -49
  22. package/discord-api-docs/.github/ISSUE_TEMPLATE/message-components-bug-report.yml +0 -49
  23. package/discord-api-docs/.github/ISSUE_TEMPLATE/slash-command-bug-report.yml +0 -49
  24. package/discord-api-docs/.github/workflows/test.yaml +0 -45
  25. package/discord-api-docs/.prettierignore +0 -1
  26. package/discord-api-docs/.prettierrc.json +0 -15
  27. package/discord-api-docs/CODE_OF_CONDUCT.md +0 -75
  28. package/discord-api-docs/CONTRIBUTING.md +0 -16
  29. package/discord-api-docs/README.md +0 -35
  30. package/discord-api-docs/docs/Change_Log.md +0 -474
  31. package/discord-api-docs/docs/Intro.md +0 -48
  32. package/discord-api-docs/docs/Legal.md +0 -154
  33. package/discord-api-docs/docs/Policy.md +0 -81
  34. package/discord-api-docs/docs/Reference.md +0 -476
  35. package/discord-api-docs/docs/Store_Distribution_Agreement.md +0 -179
  36. package/discord-api-docs/docs/dispatch/Branches_and_Builds.md +0 -654
  37. package/discord-api-docs/docs/dispatch/Dispatch_and_You.md +0 -17
  38. package/discord-api-docs/docs/dispatch/Error_Codes.md +0 -26
  39. package/discord-api-docs/docs/dispatch/Field_Values.md +0 -48
  40. package/discord-api-docs/docs/dispatch/List_of_Commands.md +0 -315
  41. package/discord-api-docs/docs/game_and_server_management/Alpha_and_Beta_Testing.md +0 -52
  42. package/discord-api-docs/docs/game_and_server_management/How_to_Get_Your_Game_on_Discord.md +0 -110
  43. package/discord-api-docs/docs/game_and_server_management/Special_Channels.md +0 -38
  44. package/discord-api-docs/docs/game_sdk/Achievements.md +0 -405
  45. package/discord-api-docs/docs/game_sdk/Activities.md +0 -561
  46. package/discord-api-docs/docs/game_sdk/Applications.md +0 -237
  47. package/discord-api-docs/docs/game_sdk/Discord.md +0 -443
  48. package/discord-api-docs/docs/game_sdk/Discord_Voice.md +0 -289
  49. package/discord-api-docs/docs/game_sdk/Images.md +0 -196
  50. package/discord-api-docs/docs/game_sdk/Lobbies.md +0 -1639
  51. package/discord-api-docs/docs/game_sdk/Networking.md +0 -377
  52. package/discord-api-docs/docs/game_sdk/Overlay.md +0 -195
  53. package/discord-api-docs/docs/game_sdk/Relationships.md +0 -234
  54. package/discord-api-docs/docs/game_sdk/SDK_Starter_Guide.md +0 -310
  55. package/discord-api-docs/docs/game_sdk/Storage.md +0 -312
  56. package/discord-api-docs/docs/game_sdk/Store.md +0 -555
  57. package/discord-api-docs/docs/game_sdk/Users.md +0 -178
  58. package/discord-api-docs/docs/interactions/Application_Commands.md +0 -1069
  59. package/discord-api-docs/docs/interactions/Message_Components.md +0 -454
  60. package/discord-api-docs/docs/interactions/Receiving_and_Responding.md +0 -372
  61. package/discord-api-docs/docs/interactions/Slash_Commands.md +0 -3
  62. package/discord-api-docs/docs/resources/Application.md +0 -82
  63. package/discord-api-docs/docs/resources/Audit_Log.md +0 -223
  64. package/discord-api-docs/docs/resources/Channel.md +0 -1267
  65. package/discord-api-docs/docs/resources/Emoji.md +0 -122
  66. package/discord-api-docs/docs/resources/Guild.md +0 -1157
  67. package/discord-api-docs/docs/resources/Guild_Scheduled_Event.md +0 -273
  68. package/discord-api-docs/docs/resources/Guild_Template.md +0 -148
  69. package/discord-api-docs/docs/resources/Invite.md +0 -150
  70. package/discord-api-docs/docs/resources/Stage_Instance.md +0 -106
  71. package/discord-api-docs/docs/resources/Sticker.md +0 -164
  72. package/discord-api-docs/docs/resources/User.md +0 -205
  73. package/discord-api-docs/docs/resources/Voice.md +0 -55
  74. package/discord-api-docs/docs/resources/Webhook.md +0 -281
  75. package/discord-api-docs/docs/rich_presence/Best_Practices.md +0 -88
  76. package/discord-api-docs/docs/rich_presence/FAQ.md +0 -45
  77. package/discord-api-docs/docs/rich_presence/How_To.md +0 -302
  78. package/discord-api-docs/docs/rich_presence/Launch_Checklist.md +0 -46
  79. package/discord-api-docs/docs/topics/Certified_Devices.md +0 -200
  80. package/discord-api-docs/docs/topics/Community_Resources.md +0 -98
  81. package/discord-api-docs/docs/topics/Gateway.md +0 -1600
  82. package/discord-api-docs/docs/topics/OAuth2.md +0 -427
  83. package/discord-api-docs/docs/topics/Opcodes_and_Status_Codes.md +0 -306
  84. package/discord-api-docs/docs/topics/Permissions.md +0 -229
  85. package/discord-api-docs/docs/topics/RPC.md +0 -1597
  86. package/discord-api-docs/docs/topics/Rate_Limits.md +0 -126
  87. package/discord-api-docs/docs/topics/Teams.md +0 -80
  88. package/discord-api-docs/docs/topics/Threads.md +0 -163
  89. package/discord-api-docs/docs/topics/Voice_Connections.md +0 -282
  90. package/discord-api-docs/images/API_center.gif +0 -0
  91. package/discord-api-docs/images/ask-to-join.gif +0 -0
  92. package/discord-api-docs/images/available-published.png +0 -0
  93. package/discord-api-docs/images/button-styles.png +0 -0
  94. package/discord-api-docs/images/certified-device.png +0 -0
  95. package/discord-api-docs/images/command-with-groups-subcommands-parameters.png +0 -0
  96. package/discord-api-docs/images/command-with-groups-subcommands.png +0 -0
  97. package/discord-api-docs/images/command.png +0 -0
  98. package/discord-api-docs/images/cpp-files-sdk.png +0 -0
  99. package/discord-api-docs/images/create-store-channel.png +0 -0
  100. package/discord-api-docs/images/deferred-example.png +0 -0
  101. package/discord-api-docs/images/desktop-select.png +0 -0
  102. package/discord-api-docs/images/game-overlay-sdk-invite.gif +0 -0
  103. package/discord-api-docs/images/game-overlay-sdk-voice-settings.png +0 -0
  104. package/discord-api-docs/images/game-overlay-sdk-voice-widget.png +0 -0
  105. package/discord-api-docs/images/gift-code-creation.png +0 -0
  106. package/discord-api-docs/images/lib-linked-sdk.png +0 -0
  107. package/discord-api-docs/images/message-command.png +0 -0
  108. package/discord-api-docs/images/mobile-select.png +0 -0
  109. package/discord-api-docs/images/previous-new-server-background.png +0 -0
  110. package/discord-api-docs/images/rp-actionable.png +0 -0
  111. package/discord-api-docs/images/rp-all-fields.png +0 -0
  112. package/discord-api-docs/images/rp-bad-art.png +0 -0
  113. package/discord-api-docs/images/rp-good-art.png +0 -0
  114. package/discord-api-docs/images/rp-legend.png +0 -0
  115. package/discord-api-docs/images/rp-long-strings.png +0 -0
  116. package/discord-api-docs/images/rp-non-actionable.png +0 -0
  117. package/discord-api-docs/images/rp-not-all-fields.png +0 -0
  118. package/discord-api-docs/images/rp-profile-example-1.png +0 -0
  119. package/discord-api-docs/images/rp-profile-example-2.png +0 -0
  120. package/discord-api-docs/images/rp-short-strings.png +0 -0
  121. package/discord-api-docs/images/server-banner-example.png +0 -0
  122. package/discord-api-docs/images/server-banner-margin-top.png +0 -0
  123. package/discord-api-docs/images/sku-management.png +0 -0
  124. package/discord-api-docs/images/snowflake.png +0 -0
  125. package/discord-api-docs/images/snowflake_original_size.png +0 -0
  126. package/discord-api-docs/images/spectate.gif +0 -0
  127. package/discord-api-docs/images/team-2fa.png +0 -0
  128. package/discord-api-docs/images/team-make-app.png +0 -0
  129. package/discord-api-docs/images/team-page.png +0 -0
  130. package/discord-api-docs/images/transfer-app-to-team.png +0 -0
  131. package/discord-api-docs/images/user-command.png +0 -0
  132. package/discord-api-docs/package-lock.json +0 -3186
  133. package/discord-api-docs/package.json +0 -38
  134. package/discord-api-docs/tsconfig.eslint.json +0 -4
  135. package/discord-api-docs/tsconfig.json +0 -19
  136. package/tsconfig.json +0 -24
@@ -1,1157 +0,0 @@
1
- # Guild Resource
2
-
3
- Guilds in Discord represent an isolated collection of users and channels, and are often referred to as "servers" in the UI.
4
-
5
- ### Guild Object
6
-
7
- ###### Guild Structure
8
-
9
- | Field | Type | Description |
10
- | ----------------------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | id | snowflake | guild id |
12
- | name | string | guild name (2-100 characters, excluding trailing and leading whitespace) |
13
- | icon | ?string | [icon hash](#DOCS_REFERENCE/image-formatting) |
14
- | icon_hash? | ?string | [icon hash](#DOCS_REFERENCE/image-formatting), returned when in the template object |
15
- | splash | ?string | [splash hash](#DOCS_REFERENCE/image-formatting) |
16
- | discovery_splash | ?string | [discovery splash hash](#DOCS_REFERENCE/image-formatting); only present for guilds with the "DISCOVERABLE" feature |
17
- | owner? \*\* | boolean | true if [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) is the owner of the guild |
18
- | owner_id | snowflake | id of owner |
19
- | permissions? \*\* | string | total permissions for [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) in the guild (excludes overwrites) |
20
- | region? \*\*\* | ?string | [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id for the guild (deprecated) |
21
- | afk_channel_id | ?snowflake | id of afk channel |
22
- | afk_timeout | integer | afk timeout in seconds |
23
- | widget_enabled? | boolean | true if the server widget is enabled |
24
- | widget_channel_id? | ?snowflake | the channel id that the widget will generate an invite to, or `null` if set to no invite |
25
- | verification_level | integer | [verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level) required for the guild |
26
- | default_message_notifications | integer | default [message notifications level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) |
27
- | explicit_content_filter | integer | [explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) |
28
- | roles | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | roles in the guild |
29
- | emojis | array of [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) objects | custom guild emojis |
30
- | features | array of [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) strings | enabled guild features |
31
- | mfa_level | integer | required [MFA level](#DOCS_RESOURCES_GUILD/guild-object-mfa-level) for the guild |
32
- | application_id | ?snowflake | application id of the guild creator if it is bot-created |
33
- | system_channel_id | ?snowflake | the id of the channel where guild notices such as welcome messages and boost events are posted |
34
- | system_channel_flags | integer | [system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags) |
35
- | rules_channel_id | ?snowflake | the id of the channel where Community guilds can display rules and/or guidelines |
36
- | joined_at? \* | ISO8601 timestamp | when this guild was joined at |
37
- | large? \* | boolean | true if this is considered a large guild |
38
- | unavailable? \* | boolean | true if this guild is unavailable due to an outage |
39
- | member_count? \* | integer | total number of members in this guild |
40
- | voice_states? \* | array of partial [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) objects | states of members currently in voice channels; lacks the `guild_id` key |
41
- | members? \* | array of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects | users in the guild |
42
- | channels? \* | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | channels in the guild |
43
- | threads? \* | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | all active threads in the guild that current user has permission to view |
44
- | presences? \* | array of partial [presence update](#DOCS_TOPICS_GATEWAY/presence-update) objects | presences of the members in the guild, will only include non-offline members if the size is greater than `large threshold` |
45
- | max_presences? | ?integer | the maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds) |
46
- | max_members? | integer | the maximum number of members for the guild |
47
- | vanity_url_code | ?string | the vanity url code for the guild |
48
- | description | ?string | the description of a Community guild |
49
- | banner | ?string | [banner hash](#DOCS_REFERENCE/image-formatting) |
50
- | premium_tier | integer | [premium tier](#DOCS_RESOURCES_GUILD/guild-object-premium-tier) (Server Boost level) |
51
- | premium_subscription_count? | integer | the number of boosts this guild currently has |
52
- | preferred_locale | string | the preferred [locale](#DOCS_REFERENCE/locales) of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US" |
53
- | public_updates_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive notices from Discord |
54
- | max_video_channel_users? | integer | the maximum amount of users in a video channel |
55
- | approximate_member_count? | integer | approximate number of members in this guild, returned from the `GET /guilds/<id>` endpoint when `with_counts` is `true` |
56
- | approximate_presence_count? | integer | approximate number of non-offline members in this guild, returned from the `GET /guilds/<id>` endpoint when `with_counts` is `true` |
57
- | welcome_screen? | [welcome screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object | the welcome screen of a Community guild, shown to new members, returned in an [Invite](#DOCS_RESOURCES_INVITE/invite-object)'s guild object |
58
- | nsfw_level | integer | [guild NSFW level](#DOCS_RESOURCES_GUILD/guild-object-guild-nsfw-level) |
59
- | stage_instances? \* | array of [stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) objects | Stage instances in the guild |
60
- | stickers? | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | custom guild stickers |
61
- | guild_scheduled_events? \* | array of [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) objects | the scheduled events in the guild |
62
- | premium_progress_bar_enabled | boolean | whether the guild has the boost progress bar enabled |
63
-
64
- ** \* These fields are only sent within the [GUILD_CREATE](#DOCS_TOPICS_GATEWAY/guild-create) event **
65
-
66
- ** \*\* These fields are only sent when using the [GET Current User Guilds](#DOCS_RESOURCES_USER/get-current-user-guilds) endpoint and are relative to the requested user **
67
-
68
- ** \*\*\* This field is deprecated and is replaced by [channel.rtc_region](#DOCS_RESOURCES_CHANNEL/channel-object-channel-structure)**
69
-
70
- ###### Default Message Notification Level
71
-
72
- | Key | Value | Description |
73
- | ------------- | ----- | ---------------------------------------------------------------------------------- |
74
- | ALL_MESSAGES | 0 | members will receive notifications for all messages by default |
75
- | ONLY_MENTIONS | 1 | members will receive notifications only for messages that @mention them by default |
76
-
77
- ###### Explicit Content Filter Level
78
-
79
- | Level | Integer | Description |
80
- | --------------------- | ------- | ----------------------------------------------------------- |
81
- | DISABLED | 0 | media content will not be scanned |
82
- | MEMBERS_WITHOUT_ROLES | 1 | media content sent by members without roles will be scanned |
83
- | ALL_MEMBERS | 2 | media content sent by all members will be scanned |
84
-
85
- ###### MFA Level
86
-
87
- | Level | Integer | Description |
88
- | -------- | ------- | ------------------------------------------------------- |
89
- | NONE | 0 | guild has no MFA/2FA requirement for moderation actions |
90
- | ELEVATED | 1 | guild has a 2FA requirement for moderation actions |
91
-
92
- ###### Verification Level
93
-
94
- | Level | Integer | Description |
95
- | --------- | ------- | --------------------------------------------------------- |
96
- | NONE | 0 | unrestricted |
97
- | LOW | 1 | must have verified email on account |
98
- | MEDIUM | 2 | must be registered on Discord for longer than 5 minutes |
99
- | HIGH | 3 | must be a member of the server for longer than 10 minutes |
100
- | VERY_HIGH | 4 | must have a verified phone number |
101
-
102
- ###### Guild NSFW Level
103
-
104
- | Level | Value |
105
- | -------------- | ------- |
106
- | DEFAULT | 0 |
107
- | EXPLICIT | 1 |
108
- | SAFE | 2 |
109
- | AGE_RESTRICTED | 3 |
110
-
111
- ###### Premium Tier
112
-
113
- | Level | Integer | Description |
114
- | ------ | ------- | --------------------------------------------- |
115
- | NONE | 0 | guild has not unlocked any Server Boost perks |
116
- | TIER_1 | 1 | guild has unlocked Server Boost level 1 perks |
117
- | TIER_2 | 2 | guild has unlocked Server Boost level 2 perks |
118
- | TIER_3 | 3 | guild has unlocked Server Boost level 3 perks |
119
-
120
- ###### System Channel Flags
121
-
122
- | Flag | Value | Description |
123
- | ------------------------------------- | ------ | -------------------------------------- |
124
- | SUPPRESS_JOIN_NOTIFICATIONS | 1 << 0 | Suppress member join notifications |
125
- | SUPPRESS_PREMIUM_SUBSCRIPTIONS | 1 << 1 | Suppress server boost notifications |
126
- | SUPPRESS_GUILD_REMINDER_NOTIFICATIONS | 1 << 2 | Suppress server setup tips |
127
- | SUPPRESS_JOIN_NOTIFICATION_REPLIES | 1 << 3 | Hide member join sticker reply buttons |
128
-
129
- ###### Guild Features
130
-
131
- | Feature | Description |
132
- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
133
- | ANIMATED_ICON | guild has access to set an animated guild icon |
134
- | BANNER | guild has access to set a guild banner image |
135
- | COMMERCE | guild has access to use commerce features (i.e. create store channels) |
136
- | COMMUNITY | guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates |
137
- | DISCOVERABLE | guild is able to be discovered in the directory |
138
- | FEATURABLE | guild is able to be featured in the directory |
139
- | INVITE_SPLASH | guild has access to set an invite splash background |
140
- | MEMBER_VERIFICATION_GATE_ENABLED | guild has enabled [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) |
141
- | MONETIZATION_ENABLED | guild has enabled monetization |
142
- | MORE_STICKERS | guild has increased custom sticker slots |
143
- | NEWS | guild has access to create news channels |
144
- | PARTNERED | guild is partnered |
145
- | PREVIEW_ENABLED | guild can be previewed before joining via Membership Screening or the directory |
146
- | PRIVATE_THREADS | guild has access to create private threads |
147
- | ROLE_ICONS | guild is able to set role icons |
148
- | SEVEN_DAY_THREAD_ARCHIVE | guild has access to the seven day archive time for threads |
149
- | THREE_DAY_THREAD_ARCHIVE | guild has access to the three day archive time for threads |
150
- | TICKETED_EVENTS_ENABLED | guild has enabled ticketed events |
151
- | VANITY_URL | guild has access to set a vanity URL |
152
- | VERIFIED | guild is verified |
153
- | VIP_REGIONS | guild has access to set 384kbps bitrate in voice (previously VIP voice servers) |
154
- | WELCOME_SCREEN_ENABLED | guild has enabled the welcome screen |
155
-
156
- ###### Example Guild
157
-
158
- ```json
159
- {
160
- "id": "197038439483310086",
161
- "name": "Discord Testers",
162
- "icon": "f64c482b807da4f539cff778d174971c",
163
- "description": "The official place to report Discord Bugs!",
164
- "splash": null,
165
- "discovery_splash": null,
166
- "features": [
167
- "ANIMATED_ICON",
168
- "VERIFIED",
169
- "NEWS",
170
- "VANITY_URL",
171
- "DISCOVERABLE",
172
- "MORE_EMOJI",
173
- "INVITE_SPLASH",
174
- "BANNER",
175
- "COMMUNITY"
176
- ],
177
- "emojis": [],
178
- "banner": "9b6439a7de04f1d26af92f84ac9e1e4a",
179
- "owner_id": "73193882359173120",
180
- "application_id": null,
181
- "region": null,
182
- "afk_channel_id": null,
183
- "afk_timeout": 300,
184
- "system_channel_id": null,
185
- "widget_enabled": true,
186
- "widget_channel_id": null,
187
- "verification_level": 3,
188
- "roles": [],
189
- "default_message_notifications": 1,
190
- "mfa_level": 1,
191
- "explicit_content_filter": 2,
192
- "max_presences": 40000,
193
- "max_members": 250000,
194
- "vanity_url_code": "discord-testers",
195
- "premium_tier": 3,
196
- "premium_subscription_count": 33,
197
- "system_channel_flags": 0,
198
- "preferred_locale": "en-US",
199
- "rules_channel_id": "441688182833020939",
200
- "public_updates_channel_id": "281283303326089216"
201
- }
202
- ```
203
-
204
- ### Unavailable Guild Object
205
-
206
- A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offline Guild, or a Guild whose information has not been provided through [Guild Create](#DOCS_TOPICS_GATEWAY/guild-create) events during the Gateway connect.
207
-
208
- ###### Example Unavailable Guild
209
-
210
- ```json
211
- {
212
- "id": "41771983423143937",
213
- "unavailable": true
214
- }
215
- ```
216
-
217
- ### Guild Preview Object
218
-
219
- ###### Guild Preview Structure
220
-
221
- | Field | Type | Description |
222
- | -------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------- |
223
- | id | snowflake | guild id |
224
- | name | string | guild name (2-100 characters) |
225
- | icon | ?string | [icon hash](#DOCS_REFERENCE/image-formatting) |
226
- | splash | ?string | [splash hash](#DOCS_REFERENCE/image-formatting) |
227
- | discovery_splash | ?string | [discovery splash hash](#DOCS_REFERENCE/image-formatting) |
228
- | emojis | array of [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) objects | custom guild emojis |
229
- | features | array of [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) strings | enabled guild features |
230
- | approximate_member_count | integer | approximate number of members in this guild |
231
- | approximate_presence_count | integer | approximate number of online members in this guild |
232
- | description | ?string | the description for the guild, if the guild is discoverable |
233
- | stickers | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | custom guild stickers |
234
-
235
- ###### Example Guild Preview
236
-
237
- ```json
238
- {
239
- "id": "197038439483310086",
240
- "name": "Discord Testers",
241
- "icon": "f64c482b807da4f539cff778d174971c",
242
- "splash": null,
243
- "discovery_splash": null,
244
- "emojis": [],
245
- "features": [
246
- "DISCOVERABLE",
247
- "VANITY_URL",
248
- "ANIMATED_ICON",
249
- "INVITE_SPLASH",
250
- "NEWS",
251
- "COMMUNITY",
252
- "BANNER",
253
- "VERIFIED",
254
- "MORE_EMOJI"
255
- ],
256
- "approximate_member_count": 60814,
257
- "approximate_presence_count": 20034,
258
- "description": "The official place to report Discord Bugs!",
259
- "stickers": []
260
- }
261
- ```
262
-
263
- ### Guild Widget Settings Object
264
-
265
- ###### Guild Widget Settings Structure
266
-
267
- | Field | Type | Description |
268
- | ---------- | ---------- | ----------------------------- |
269
- | enabled | boolean | whether the widget is enabled |
270
- | channel_id | ?snowflake | the widget channel id |
271
-
272
- ###### Example Guild Widget Settings
273
-
274
- ```json
275
- {
276
- "enabled": true,
277
- "channel_id": "41771983444115456"
278
- }
279
- ```
280
-
281
- ### Get Guild Widget Object
282
-
283
- ###### Get Guild Widget Structure
284
-
285
- | Field | Type | Description |
286
- | -------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------- |
287
- | id | snowflake | guild id |
288
- | name | string | guild name (2-100 characters) |
289
- | instant_invite | ?string | instant invite for the guilds specified widget invite channel |
290
- | channels | array of partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | voice and stage channels which are accessible by @everyone |
291
- | members | array of partial [user](#DOCS_RESOURCES_USER/user-object) objects | special widget user objects that includes users presence (Limit 100) |
292
- | presence_count | integer | number of online members in this guild |
293
-
294
- > warn
295
- > The fields `id`, `discriminator` and `avatar` are anonymized to prevent abuse.
296
-
297
- ###### Example Get Guild Widget
298
-
299
- ```json
300
- {
301
- "id": "290926798626999250",
302
- "name": "Test Server",
303
- "instant_invite": "https://discord.com/invite/abcdefg",
304
- "channels": [
305
- {
306
- "id": "705216630279993882",
307
- "name": "elephant",
308
- "position": 2
309
- },
310
- {
311
- "id": "669583461748992190",
312
- "name": "groovy-music",
313
- "position": 1
314
- }
315
- ],
316
- "members": [
317
- {
318
- "id": "0",
319
- "username": "1234",
320
- "discriminator": "0000",
321
- "avatar": null,
322
- "status": "online",
323
- "avatar_url": "https://cdn.discordapp.com/widget-avatars/FfvURgcr3Za92K3JtoCppqnYMppMDc5B-Rll74YrGCU/C-1DyBZPQ6t5q2RuATFuMFgq0_uEMZVzd_6LbGN_uJKvZflobA9diAlTjhf6CAESLLeTuu4dLuHFWOb_PNLteooNfhC4C6k5QgAGuxEOP12tVVVCvX6t64k14PMXZrGTDq8pWZhukP40Wg"
324
- }
325
- ],
326
- "presence_count": 1
327
- }
328
- ```
329
-
330
- ### Guild Member Object
331
-
332
- ###### Guild Member Structure
333
-
334
- | Field | Type | Description |
335
- | ----------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
336
- | user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user this guild member represents |
337
- | nick? | ?string | this user's guild nickname |
338
- | avatar? | ?string | the member's [guild avatar hash](#DOCS_REFERENCE/image-formatting) |
339
- | roles | array of snowflakes | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids |
340
- | joined_at | ISO8601 timestamp | when the user joined the guild |
341
- | premium_since? | ?ISO8601 timestamp | when the user started [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild |
342
- | deaf | boolean | whether the user is deafened in voice channels |
343
- | mute | boolean | whether the user is muted in voice channels |
344
- | pending? | boolean | whether the user has not yet passed the guild's [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) requirements |
345
- | permissions? | string | total permissions of the member in the channel, including overwrites, returned when in the interaction object |
346
- | communication_disabled_until? | ?ISO8601 timestamp | when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out |
347
-
348
- > info
349
- > The field `user` won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.
350
-
351
- > info
352
- > In `GUILD_` events, `pending` will always be included as true or false. In non `GUILD_` events which can only be triggered by non-`pending` users, `pending` will not be included.
353
-
354
- ###### Example Guild Member
355
-
356
- ```json
357
- {
358
- "user": {},
359
- "nick": "NOT API SUPPORT",
360
- "avatar": null,
361
- "roles": [],
362
- "joined_at": "2015-04-26T06:26:56.936000+00:00",
363
- "deaf": false,
364
- "mute": false
365
- }
366
- ```
367
-
368
- ### Integration Object
369
-
370
- ###### Integration Structure
371
-
372
- | Field | Type | Description |
373
- | ----------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
374
- | id | snowflake | integration id |
375
- | name | string | integration name |
376
- | type | string | integration type (twitch, youtube, or discord) |
377
- | enabled | boolean | is this integration enabled |
378
- | syncing? \* | boolean | is this integration syncing |
379
- | role_id? \* | snowflake | id that this integration uses for "subscribers" |
380
- | enable_emoticons? \* | boolean | whether emoticons should be synced for this integration (twitch only currently) |
381
- | expire_behavior? \* | [integration expire behavior](#DOCS_RESOURCES_GUILD/integration-object-integration-expire-behaviors) | the behavior of expiring subscribers |
382
- | expire_grace_period? \* | integer | the grace period (in days) before expiring subscribers |
383
- | user? \* | [user](#DOCS_RESOURCES_USER/user-object) object | user for this integration |
384
- | account | [account](#DOCS_RESOURCES_GUILD/integration-account-object) object | integration account information |
385
- | synced_at? \* | ISO8601 timestamp | when this integration was last synced |
386
- | subscriber_count? \* | integer | how many subscribers this integration has |
387
- | revoked? \* | boolean | has this integration been revoked |
388
- | application? | [application](#DOCS_RESOURCES_GUILD/integration-application-object) object | The bot/OAuth2 application for discord integrations |
389
-
390
- ** \* These fields are not provided for discord bot integrations. **
391
-
392
- ###### Integration Expire Behaviors
393
-
394
- | Value | Name |
395
- | ----- | ----------- |
396
- | 0 | Remove role |
397
- | 1 | Kick |
398
-
399
- ### Integration Account Object
400
-
401
- ###### Integration Account Structure
402
-
403
- | Field | Type | Description |
404
- | ----- | ------ | ------------------- |
405
- | id | string | id of the account |
406
- | name | string | name of the account |
407
-
408
- ### Integration Application Object
409
-
410
- ###### Integration Application Structure
411
-
412
- | Field | Type | Description |
413
- | ----------- | ----------------------------------------------- | ------------------------------------------------------------ |
414
- | id | snowflake | the id of the app |
415
- | name | string | the name of the app |
416
- | icon | ?string | the [icon hash](#DOCS_REFERENCE/image-formatting) of the app |
417
- | description | string | the description of the app |
418
- | summary | string | the summary of the app |
419
- | bot? | [user](#DOCS_RESOURCES_USER/user-object) object | the bot associated with this application |
420
-
421
- ### Ban Object
422
-
423
- ###### Ban Structure
424
-
425
- | Field | Type | Description |
426
- | ------ | ----------------------------------------------- | ---------------------- |
427
- | reason | ?string | the reason for the ban |
428
- | user | [user](#DOCS_RESOURCES_USER/user-object) object | the banned user |
429
-
430
- ###### Example Ban
431
-
432
- ```json
433
- {
434
- "reason": "mentioning b1nzy",
435
- "user": {
436
- "username": "Mason",
437
- "discriminator": "9999",
438
- "id": "53908099506183680",
439
- "avatar": "a_bab14f271d565501444b2ca3be944b25",
440
- "public_flags": 131141
441
- }
442
- }
443
- ```
444
-
445
- ### Welcome Screen Object
446
-
447
- ###### Welcome Screen Structure
448
-
449
- | Field | Type | Description |
450
- | ---------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
451
- | description | ?string | the server description shown in the welcome screen |
452
- | welcome_channels | array of [welcome screen channel](#DOCS_RESOURCES_GUILD/welcome-screen-object-welcome-screen-channel-structure) objects | the channels shown in the welcome screen, up to 5 |
453
-
454
- ###### Welcome Screen Channel Structure
455
-
456
- | Field | Type | Description |
457
- | ----------- | ---------- | ----------------------------------------------------------------------------------------- |
458
- | channel_id | snowflake | the channel's id |
459
- | description | string | the description shown for the channel |
460
- | emoji_id | ?snowflake | the [emoji id](#DOCS_REFERENCE/image-formatting), if the emoji is custom |
461
- | emoji_name | ?string | the emoji name if custom, the unicode character if standard, or `null` if no emoji is set |
462
-
463
- ###### Example Welcome Screen
464
-
465
- ```json
466
- {
467
- "description": "Discord Developers is a place to learn about Discord's API, bots, and SDKs and integrations. This is NOT a general Discord support server.",
468
- "welcome_channels": [
469
- {
470
- "channel_id": "697138785317814292",
471
- "description": "Follow for official Discord API updates",
472
- "emoji_id": null,
473
- "emoji_name": "📡"
474
- },
475
- {
476
- "channel_id": "697236247739105340",
477
- "description": "Get help with Bot Verifications",
478
- "emoji_id": null,
479
- "emoji_name": "📸"
480
- },
481
- {
482
- "channel_id": "697489244649816084",
483
- "description": "Create amazing things with Discord's API",
484
- "emoji_id": null,
485
- "emoji_name": "🔬"
486
- },
487
- {
488
- "channel_id": "613425918748131338",
489
- "description": "Integrate Discord into your game",
490
- "emoji_id": null,
491
- "emoji_name": "🎮"
492
- },
493
- {
494
- "channel_id": "646517734150242346",
495
- "description": "Find more places to help you on your quest",
496
- "emoji_id": null,
497
- "emoji_name": "🔦"
498
- }
499
- ]
500
- }
501
- ```
502
-
503
- ### Membership Screening Object
504
-
505
- In guilds with [Membership Screening](https://support.discord.com/hc/en-us/articles/1500000466882) enabled, when a member joins, [Guild Member Add](#DOCS_TOPICS_GATEWAY/guild-member-add) will be emitted but they will initially be restricted from doing any actions in the guild, and `pending` will be true in the [member object](#DOCS_RESOURCES_GUILD/guild-member-object). When the member completes the screening, [Guild Member Update](#DOCS_TOPICS_GATEWAY/guild-member-update) will be emitted and `pending` will be false.
506
-
507
- Giving the member a role will bypass Membership Screening as well as the guild's verification level, giving the member immediate access to chat. Therefore, instead of giving a role when the member joins, it is recommended to not give the role until the user is no longer `pending`.
508
-
509
- > warn
510
- > We are making significant changes to the Membership Screening API specifically related to getting and editing the Membership Screening object. Long story short is that it can be improved. As such, we have removed those documentation. There will **not be** any changes to how pending members work, as outlined above. That behavior will stay the same.
511
-
512
- ## Create Guild % POST /guilds
513
-
514
- Create a new guild. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object on success. Fires a [Guild Create](#DOCS_TOPICS_GATEWAY/guild-create) Gateway event.
515
-
516
- > warn
517
- > This endpoint can be used only by bots in less than 10 guilds.
518
-
519
- ###### JSON Params
520
-
521
- | Field | Type | Description |
522
- | ------------------------------ | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
523
- | name | string | name of the guild (2-100 characters) |
524
- | region? | ?string | [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id (deprecated) |
525
- | icon? | [image data](#DOCS_REFERENCE/image-data) | base64 128x128 image for the guild icon |
526
- | verification_level? | integer | [verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level) |
527
- | default_message_notifications? | integer | default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) |
528
- | explicit_content_filter? | integer | [explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) |
529
- | roles? | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | new guild roles |
530
- | channels? | array of partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | new guild's channels |
531
- | afk_channel_id? | snowflake | id for afk channel |
532
- | afk_timeout? | integer | afk timeout in seconds |
533
- | system_channel_id? | snowflake | the id of the channel where guild notices such as welcome messages and boost events are posted |
534
- | system_channel_flags? | integer | [system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags) |
535
-
536
- > warn
537
- > When using the `roles` parameter, the first member of the array is used to change properties of the guild's `@everyone` role. If you are trying to bootstrap a guild with additional roles, keep this in mind.
538
-
539
- > info
540
- > When using the `roles` parameter, the required `id` field within each role object is an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) a role's permissions in a channel when also passing in channels with the channels array.
541
-
542
- > warn
543
- > When using the `channels` parameter, the `position` field is ignored, and none of the default channels are created.
544
-
545
- > info
546
- > When using the `channels` parameter, the `id` field within each channel object may be set to an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels by setting the `parent_id` field on any children to the category's `id` field. Category channels must be listed before any children.
547
-
548
- > warn
549
- > The `region` field is deprecated and is replaced by [channel.rtc_region](#DOCS_RESOURCES_CHANNEL/channel-object-channel-structure).
550
-
551
- ###### Example Partial Channel Object
552
-
553
- ```json
554
- {
555
- "name": "naming-things-is-hard",
556
- "type": 0
557
- }
558
- ```
559
-
560
- ###### Example Category Channel
561
-
562
- ```json
563
- {
564
- "name": "my-category",
565
- "type": 4,
566
- "id": 1
567
- }
568
- {
569
- "name": "naming-things-is-hard",
570
- "type": 0,
571
- "id": 2,
572
- "parent_id": 1
573
- }
574
- ```
575
-
576
- ## Get Guild % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}
577
-
578
- Returns the [guild](#DOCS_RESOURCES_GUILD/guild-object) object for the given id. If `with_counts` is set to `true`, this endpoint will also return `approximate_member_count` and `approximate_presence_count` for the guild.
579
-
580
- ###### Query String Params
581
-
582
- | Field | Type | Description | Required | Default |
583
- | ------------ | ------- | ----------------------------------------------------------------------------- | -------- | ------- |
584
- | with_counts? | boolean | when `true`, will return approximate member and presence counts for the guild | false | false |
585
-
586
- ###### Example Response
587
-
588
- ```json
589
- {
590
- "id": "2909267986263572999",
591
- "name": "Mason's Test Server",
592
- "icon": "389030ec9db118cb5b85a732333b7c98",
593
- "description": null,
594
- "splash": "75610b05a0dd09ec2c3c7df9f6975ea0",
595
- "discovery_splash": null,
596
- "approximate_member_count": 2,
597
- "approximate_presence_count": 2,
598
- "features": [
599
- "INVITE_SPLASH",
600
- "VANITY_URL",
601
- "COMMERCE",
602
- "BANNER",
603
- "NEWS",
604
- "VERIFIED",
605
- "VIP_REGIONS"
606
- ],
607
- "emojis": [
608
- {
609
- "name": "ultrafastparrot",
610
- "roles": [],
611
- "id": "393564762228785161",
612
- "require_colons": true,
613
- "managed": false,
614
- "animated": true,
615
- "available": true
616
- }
617
- ],
618
- "banner": "5c3cb8d1bc159937fffe7e641ec96ca7",
619
- "owner_id": "53908232506183680",
620
- "application_id": null,
621
- "region": null,
622
- "afk_channel_id": null,
623
- "afk_timeout": 300,
624
- "system_channel_id": null,
625
- "widget_enabled": true,
626
- "widget_channel_id": "639513352485470208",
627
- "verification_level": 0,
628
- "roles": [
629
- {
630
- "id": "2909267986263572999",
631
- "name": "@everyone",
632
- "permissions": "49794752",
633
- "position": 0,
634
- "color": 0,
635
- "hoist": false,
636
- "managed": false,
637
- "mentionable": false
638
- }
639
- ],
640
- "default_message_notifications": 1,
641
- "mfa_level": 0,
642
- "explicit_content_filter": 0,
643
- "max_presences": null,
644
- "max_members": 250000,
645
- "max_video_channel_users": 25,
646
- "vanity_url_code": "no",
647
- "premium_tier": 0,
648
- "premium_subscription_count": 0,
649
- "system_channel_flags": 0,
650
- "preferred_locale": "en-US",
651
- "rules_channel_id": null,
652
- "public_updates_channel_id": null
653
- }
654
- ```
655
-
656
- ## Get Guild Preview % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/preview
657
-
658
- Returns the [guild preview](#DOCS_RESOURCES_GUILD/guild-preview-object) object for the given id. If the user is not in the guild, then the guild must be lurkable.
659
-
660
- ## Modify Guild % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}
661
-
662
- Modify a guild's settings. Requires the `MANAGE_GUILD` permission. Returns the updated [guild](#DOCS_RESOURCES_GUILD/guild-object) object on success. Fires a [Guild Update](#DOCS_TOPICS_GATEWAY/guild-update) Gateway event.
663
-
664
- > info
665
- > All parameters to this endpoint are optional
666
-
667
- > info
668
- > This endpoint supports the `X-Audit-Log-Reason` header.
669
-
670
- > warn
671
- > Attempting to add or remove the `COMMUNITY` [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) requires the `ADMINISTRATOR` permission.
672
-
673
- ###### JSON Params
674
-
675
- | Field | Type | Description |
676
- | ----------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
677
- | name | string | guild name |
678
- | region | ?string | guild [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id (deprecated) |
679
- | verification_level | ?integer | [verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level) |
680
- | default_message_notifications | ?integer | default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) |
681
- | explicit_content_filter | ?integer | [explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) |
682
- | afk_channel_id | ?snowflake | id for afk channel |
683
- | afk_timeout | integer | afk timeout in seconds |
684
- | icon | ?[image data](#DOCS_REFERENCE/image-data) | base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the `ANIMATED_ICON` feature) |
685
- | owner_id | snowflake | user id to transfer guild ownership to (must be owner) |
686
- | splash | ?[image data](#DOCS_REFERENCE/image-data) | base64 16:9 png/jpeg image for the guild splash (when the server has the `INVITE_SPLASH` feature) |
687
- | discovery_splash | ?[image data](#DOCS_REFERENCE/image-data) | base64 16:9 png/jpeg image for the guild discovery splash (when the server has the `DISCOVERABLE` feature) |
688
- | banner | ?[image data](#DOCS_REFERENCE/image-data) | base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature) |
689
- | system_channel_id | ?snowflake | the id of the channel where guild notices such as welcome messages and boost events are posted |
690
- | system_channel_flags | integer | [system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags) |
691
- | rules_channel_id | ?snowflake | the id of the channel where Community guilds display rules and/or guidelines |
692
- | public_updates_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive notices from Discord |
693
- | preferred_locale | ?string | the preferred [locale](#DOCS_REFERENCE/locales) of a Community guild used in server discovery and notices from Discord; defaults to "en-US" |
694
- | features | array of [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) strings | enabled guild features |
695
- | description | ?string | the description for the guild, if the guild is discoverable |
696
- | premium_progress_bar_enabled | boolean | whether the guild's boost progress bar should be enabled. |
697
-
698
- ## Delete Guild % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}
699
-
700
- Delete a guild permanently. User must be owner. Returns `204 No Content` on success. Fires a [Guild Delete](#DOCS_TOPICS_GATEWAY/guild-delete) Gateway event.
701
-
702
- ## Get Guild Channels % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/channels
703
-
704
- Returns a list of guild [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects. Does not include threads.
705
-
706
- ## Create Guild Channel % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/channels
707
-
708
- Create a new [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object for the guild. Requires the `MANAGE_CHANNELS` permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting `MANAGE_ROLES` permission in channels is only possible for guild administrators. Returns the new [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object on success. Fires a [Channel Create](#DOCS_TOPICS_GATEWAY/channel-create) Gateway event.
709
-
710
- > info
711
- > All parameters to this endpoint are optional excluding 'name'
712
-
713
- > info
714
- > This endpoint supports the `X-Audit-Log-Reason` header.
715
-
716
- ###### JSON Params
717
-
718
- | Field | Type | Description |
719
- | ----------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
720
- | name | string | channel name (1-100 characters) |
721
- | type | integer | the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) |
722
- | topic | string | channel topic (0-1024 characters) |
723
- | bitrate | integer | the bitrate (in bits) of the voice channel (voice only) |
724
- | user_limit | integer | the user limit of the voice channel (voice only) |
725
- | rate_limit_per_user | integer | amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected |
726
- | position | integer | sorting position of the channel |
727
- | permission_overwrites\* | array of partial [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | the channel's permission overwrites |
728
- | parent_id | snowflake | id of the parent category for a channel |
729
- | nsfw | boolean | whether the channel is nsfw |
730
-
731
- \* In each overwrite object, the `allow` and `deny` keys can be omitted or set to `null`, which both default to `"0"`.
732
-
733
- ## Modify Guild Channel Positions % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/channels
734
-
735
- Modify the positions of a set of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects for the guild. Requires `MANAGE_CHANNELS` permission. Returns a 204 empty response on success. Fires multiple [Channel Update](#DOCS_TOPICS_GATEWAY/channel-update) Gateway events.
736
-
737
- > info
738
- > Only channels to be modified are required.
739
-
740
- > info
741
- > This endpoint supports the `X-Audit-Log-Reason` header.
742
-
743
- This endpoint takes a JSON array of parameters in the following format:
744
-
745
- ###### JSON Params
746
-
747
- | Field | Type | Description |
748
- | ---------------- | ---------- | -------------------------------------------------------------------------------- |
749
- | id | snowflake | channel id |
750
- | position | ?integer | sorting position of the channel |
751
- | lock_permissions | ?boolean | syncs the permission overwrites with the new parent, if moving to a new category |
752
- | parent_id | ?snowflake | the new parent ID for the channel that is moved |
753
-
754
- ## List Active Threads % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/threads/active
755
-
756
- Returns all active threads in the guild, including public and private threads. Threads are ordered by their `id`, in descending order.
757
-
758
- ###### Response Body
759
-
760
- | Field | Type | Description |
761
- |----------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
762
- | threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | the active threads |
763
- | members | array of [thread members](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | a thread member object for each returned thread the current user has joined |
764
-
765
- ## Get Guild Member % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}
766
-
767
- Returns a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object for the specified user.
768
-
769
- ## List Guild Members % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members
770
-
771
- Returns a list of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects that are members of the guild.
772
-
773
- > warn
774
- > This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged Intent](#DOCS_TOPICS_GATEWAY/privileged-intents) is enabled for your application.
775
-
776
- > info
777
- > All parameters to this endpoint are optional
778
-
779
- ###### Query String Params
780
-
781
- | Field | Type | Description | Default |
782
- | ----- | --------- | ---------------------------------------- | ------- |
783
- | limit | integer | max number of members to return (1-1000) | 1 |
784
- | after | snowflake | the highest user id in the previous page | 0 |
785
-
786
- ## Search Guild Members % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/search
787
-
788
- Returns a list of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects whose username or nickname starts with a provided string.
789
-
790
- > info
791
- > All parameters to this endpoint except for `query` are optional
792
-
793
- ###### Query String Params
794
-
795
- | Field | Type | Description | Default |
796
- | ----- | ------- | ---------------------------------------------------------- | ------- |
797
- | query | string | Query string to match username(s) and nickname(s) against. | |
798
- | limit | integer | max number of members to return (1-1000) | 1 |
799
-
800
- ## Add Guild Member % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}
801
-
802
- Adds a user to the guild, provided you have a valid oauth2 access token for the user with the `guilds.join` scope. Returns a 201 Created with the [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) as the body, or 204 No Content if the user is already a member of the guild. Fires a [Guild Member Add](#DOCS_TOPICS_GATEWAY/guild-member-add) Gateway event.
803
-
804
- For guilds with [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) enabled, this endpoint will default to adding new members as `pending` in the [guild member object](#DOCS_RESOURCES_GUILD/guild-member-object). Members that are `pending` will have to complete membership screening before they become full members that can talk.
805
-
806
- > info
807
- > All parameters to this endpoint except for `access_token` are optional.
808
-
809
- > info
810
- > The Authorization header must be a Bot token (belonging to the same application used for authorization), and the bot must be a member of the guild with `CREATE_INSTANT_INVITE` permission.
811
-
812
- ###### JSON Params
813
-
814
- | Field | Type | Description | Permission |
815
- | ------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------- |
816
- | access_token | string | an oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild | |
817
- | nick | string | value to set user's nickname to | MANAGE_NICKNAMES |
818
- | roles | array of snowflakes | array of role ids the member is assigned | MANAGE_ROLES |
819
- | mute | boolean | whether the user is muted in voice channels | MUTE_MEMBERS |
820
- | deaf | boolean | whether the user is deafened in voice channels | DEAFEN_MEMBERS |
821
-
822
- > warn
823
- > For guilds with Membership Screening enabled, assigning a role using the `roles` parameter will add the user to the guild as a full member (`pending` is false in the [member object](#DOCS_RESOURCES_GUILD/guild-member-object)). A member with a role will bypass membership screening and the guild's verification level, and get immediate access to chat. Therefore, instead of assigning a role when the member joins, it is recommended to grant roles only after the user completes screening.
824
-
825
- ## Modify Guild Member % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}
826
-
827
- Modify attributes of a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object). Returns a 200 OK with the [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) as the body. Fires a [Guild Member Update](#DOCS_TOPICS_GATEWAY/guild-member-update) Gateway event. If the `channel_id` is set to null, this will force the target user to be disconnected from voice.
828
-
829
- > info
830
- > All parameters to this endpoint are optional and nullable. When moving members to channels, the API user _must_ have permissions to both connect to the channel and have the `MOVE_MEMBERS` permission.
831
-
832
- > info
833
- > This endpoint supports the `X-Audit-Log-Reason` header.
834
-
835
- ###### JSON Params
836
-
837
- | Field | Type | Description | Permission |
838
- | ---------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
839
- | nick | string | value to set user's nickname to | MANAGE_NICKNAMES |
840
- | roles | array of snowflakes | array of role ids the member is assigned | MANAGE_ROLES |
841
- | mute | boolean | whether the user is muted in voice channels. Will throw a 400 error if the user is not in a voice channel | MUTE_MEMBERS |
842
- | deaf | boolean | whether the user is deafened in voice channels. Will throw a 400 error if the user is not in a voice channel | DEAFEN_MEMBERS |
843
- | channel_id | snowflake | id of channel to move user to (if they are connected to voice) | MOVE_MEMBERS |
844
- | communication_disabled_until | ?ISO8601 timestamp | when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Will throw a 403 error if the user has the ADMINISTRATOR permission or is the owner of the guild | MODERATE_MEMBERS |
845
-
846
- ## Modify Current Member % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/@me
847
-
848
- Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a [Guild Member Update](#DOCS_TOPICS_GATEWAY/guild-member-update) Gateway event.
849
-
850
- > info
851
- > This endpoint supports the `X-Audit-Log-Reason` header.
852
-
853
- ###### JSON Params
854
-
855
- | Field | Type | Description | Permission |
856
- | ----- | ------- | ------------------------------- | --------------- |
857
- | nick? | ?string | value to set user's nickname to | CHANGE_NICKNAME |
858
-
859
- ## Modify Current User Nick % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/@me/nick
860
-
861
- > danger
862
- > Deprecated in favor of [Modify Current Member](#DOCS_RESOURCES_GUILD/modify-current-member).
863
-
864
- Modifies the nickname of the current user in a guild. Returns a 200 with the nickname on success. Fires a [Guild Member Update](#DOCS_TOPICS_GATEWAY/guild-member-update) Gateway event.
865
-
866
- > info
867
- > This endpoint supports the `X-Audit-Log-Reason` header.
868
-
869
- ###### JSON Params
870
-
871
- | Field | Type | Description | Permission |
872
- | ----- | ------- | ------------------------------- | --------------- |
873
- | nick? | ?string | value to set user's nickname to | CHANGE_NICKNAME |
874
-
875
- ## Add Guild Member Role % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object}
876
-
877
- Adds a role to a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object). Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Member Update](#DOCS_TOPICS_GATEWAY/guild-member-update) Gateway event.
878
-
879
- > info
880
- > This endpoint supports the `X-Audit-Log-Reason` header.
881
-
882
- ## Remove Guild Member Role % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object}
883
-
884
- Removes a role from a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object). Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Member Update](#DOCS_TOPICS_GATEWAY/guild-member-update) Gateway event.
885
-
886
- > info
887
- > This endpoint supports the `X-Audit-Log-Reason` header.
888
-
889
- ## Remove Guild Member % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}
890
-
891
- Remove a member from a guild. Requires `KICK_MEMBERS` permission. Returns a 204 empty response on success. Fires a [Guild Member Remove](#DOCS_TOPICS_GATEWAY/guild-member-remove) Gateway event.
892
-
893
- > info
894
- > This endpoint supports the `X-Audit-Log-Reason` header.
895
-
896
- ## Get Guild Bans % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans
897
-
898
- Returns a list of [ban](#DOCS_RESOURCES_GUILD/ban-object) objects for the users banned from this guild. Requires the `BAN_MEMBERS` permission.
899
-
900
- ## Get Guild Ban % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans/{user.id#DOCS_RESOURCES_USER/user-object}
901
-
902
- Returns a [ban](#DOCS_RESOURCES_GUILD/ban-object) object for the given user or a 404 not found if the ban cannot be found. Requires the `BAN_MEMBERS` permission.
903
-
904
- ## Create Guild Ban % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans/{user.id#DOCS_RESOURCES_USER/user-object}
905
-
906
- Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the `BAN_MEMBERS` permission. Returns a 204 empty response on success. Fires a [Guild Ban Add](#DOCS_TOPICS_GATEWAY/guild-ban-add) Gateway event.
907
-
908
- > info
909
- > This endpoint supports the `X-Audit-Log-Reason` header.
910
-
911
- ###### JSON Params
912
-
913
- | Field | Type | Description | Default |
914
- | -------------------- | ------- | ------------------------------------------- | ------- |
915
- | delete_message_days? | integer | number of days to delete messages for (0-7) | 0 |
916
- | reason? | string | reason for the ban (deprecated) | |
917
-
918
- ## Remove Guild Ban % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans/{user.id#DOCS_RESOURCES_USER/user-object}
919
-
920
- Remove the ban for a user. Requires the `BAN_MEMBERS` permissions. Returns a 204 empty response on success. Fires a [Guild Ban Remove](#DOCS_TOPICS_GATEWAY/guild-ban-remove) Gateway event.
921
-
922
- > info
923
- > This endpoint supports the `X-Audit-Log-Reason` header.
924
-
925
- ## Get Guild Roles % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles
926
-
927
- Returns a list of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects for the guild.
928
-
929
- ## Create Guild Role % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles
930
-
931
- Create a new [role](#DOCS_TOPICS_PERMISSIONS/role-object) for the guild. Requires the `MANAGE_ROLES` permission. Returns the new [role](#DOCS_TOPICS_PERMISSIONS/role-object) object on success. Fires a [Guild Role Create](#DOCS_TOPICS_GATEWAY/guild-role-create) Gateway event. All JSON params are optional.
932
-
933
- > info
934
- > This endpoint supports the `X-Audit-Log-Reason` header.
935
-
936
- ###### JSON Params
937
-
938
- | Field | Type | Description | Default |
939
- | ------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ |
940
- | name | string | name of the role | "new role" |
941
- | permissions | string | bitwise value of the enabled/disabled permissions | @everyone permissions in guild |
942
- | color | integer | RGB color value | 0 |
943
- | hoist | boolean | whether the role should be displayed separately in the sidebar | false |
944
- | icon | ?[image data](#DOCS_REFERENCE/image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) | null |
945
- | unicode_emoji | ?string | the role's unicode emoji as a [standard emoji](#DOCS_REFERENCE/message-formatting) (if the guild has the `ROLE_ICONS` feature) | null |
946
- | mentionable | boolean | whether the role should be mentionable | false |
947
-
948
- ## Modify Guild Role Positions % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles
949
-
950
- Modify the positions of a set of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects for the guild. Requires the `MANAGE_ROLES` permission. Returns a list of all of the guild's [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects on success. Fires multiple [Guild Role Update](#DOCS_TOPICS_GATEWAY/guild-role-update) Gateway events.
951
-
952
- > info
953
- > This endpoint supports the `X-Audit-Log-Reason` header.
954
-
955
- This endpoint takes a JSON array of parameters in the following format:
956
-
957
- ###### JSON Params
958
-
959
- | Field | Type | Description |
960
- | --------- | --------- | ---------------------------- |
961
- | id | snowflake | role |
962
- | position? | ?integer | sorting position of the role |
963
-
964
- ## Modify Guild Role % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object}
965
-
966
- Modify a guild role. Requires the `MANAGE_ROLES` permission. Returns the updated [role](#DOCS_TOPICS_PERMISSIONS/role-object) on success. Fires a [Guild Role Update](#DOCS_TOPICS_GATEWAY/guild-role-update) Gateway event.
967
-
968
- > info
969
- > All parameters to this endpoint are optional and nullable.
970
-
971
- > info
972
- > This endpoint supports the `X-Audit-Log-Reason` header.
973
-
974
- ###### JSON Params
975
-
976
- | Field | Type | Description |
977
- | ------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
978
- | name | string | name of the role |
979
- | permissions | string | bitwise value of the enabled/disabled permissions |
980
- | color | integer | RGB color value |
981
- | hoist | boolean | whether the role should be displayed separately in the sidebar |
982
- | icon | [image data](#DOCS_REFERENCE/image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) |
983
- | unicode_emoji | string | the role's unicode emoji as a [standard emoji](#DOCS_REFERENCE/message-formatting) (if the guild has the `ROLE_ICONS` feature) |
984
- | mentionable | boolean | whether the role should be mentionable |
985
-
986
- ## Delete Guild Role % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object}
987
-
988
- Delete a guild role. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Role Delete](#DOCS_TOPICS_GATEWAY/guild-role-delete) Gateway event.
989
-
990
- > info
991
- > This endpoint supports the `X-Audit-Log-Reason` header.
992
-
993
- ## Get Guild Prune Count % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/prune
994
-
995
- Returns an object with one 'pruned' key indicating the number of members that would be removed in a prune operation. Requires the `KICK_MEMBERS` permission.
996
-
997
- By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the `include_roles` parameter. Any inactive user that has a subset of the provided role(s) will be counted in the prune and users with additional roles will not.
998
-
999
- ###### Query String Params
1000
-
1001
- | Field | Type | Description | Default |
1002
- | ------------- | ------------------------------------------- | ---------------------------------------- | ------- |
1003
- | days | integer | number of days to count prune for (1-30) | 7 |
1004
- | include_roles | string; comma-delimited array of snowflakes | role(s) to include | none |
1005
-
1006
- ## Begin Guild Prune % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/prune
1007
-
1008
- Begin a prune operation. Requires the `KICK_MEMBERS` permission. Returns an object with one 'pruned' key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the `compute_prune_count` option to `false`, forcing 'pruned' to `null`. Fires multiple [Guild Member Remove](#DOCS_TOPICS_GATEWAY/guild-member-remove) Gateway events.
1009
-
1010
- By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the `include_roles` parameter. Any inactive user that has a subset of the provided role(s) will be included in the prune and users with additional roles will not.
1011
-
1012
- > info
1013
- > This endpoint supports the `X-Audit-Log-Reason` header.
1014
-
1015
- ###### JSON Params
1016
-
1017
- | Field | Type | Description | Default |
1018
- | ------------------- | ------------------- | ---------------------------------------------------------- | ------- |
1019
- | days | integer | number of days to prune (1-30) | 7 |
1020
- | compute_prune_count | boolean | whether 'pruned' is returned, discouraged for large guilds | true |
1021
- | include_roles | array of snowflakes | role(s) to include | none |
1022
- | reason? | string | reason for the prune (deprecated) | |
1023
-
1024
- ## Get Guild Voice Regions % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/regions
1025
-
1026
- Returns a list of [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) objects for the guild. Unlike the similar `/voice` route, this returns VIP servers when the guild is VIP-enabled.
1027
-
1028
- ## Get Guild Invites % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/invites
1029
-
1030
- Returns a list of [invite](#DOCS_RESOURCES_INVITE/invite-object) objects (with [invite metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object)) for the guild. Requires the `MANAGE_GUILD` permission.
1031
-
1032
- ## Get Guild Integrations % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/integrations
1033
-
1034
- Returns a list of [integration](#DOCS_RESOURCES_GUILD/integration-object) objects for the guild. Requires the `MANAGE_GUILD` permission.
1035
-
1036
- ## Delete Guild Integration % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/integrations/{integration.id#DOCS_RESOURCES_GUILD/integration-object}
1037
-
1038
- Delete the attached [integration](#DOCS_RESOURCES_GUILD/integration-object) object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the `MANAGE_GUILD` permission. Returns a 204 empty response on success. Fires a [Guild Integrations Update](#DOCS_TOPICS_GATEWAY/guild-integrations-update) Gateway event.
1039
-
1040
- > info
1041
- > This endpoint supports the `X-Audit-Log-Reason` header.
1042
-
1043
- ## Get Guild Widget Settings % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget
1044
-
1045
- Returns a [guild widget settings](#DOCS_RESOURCES_GUILD/guild-widget-settings-object) object. Requires the `MANAGE_GUILD` permission.
1046
-
1047
- ## Modify Guild Widget % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget
1048
-
1049
- Modify a [guild widget settings](#DOCS_RESOURCES_GUILD/guild-widget-settings-object) object for the guild. All attributes may be passed in with JSON and modified. Requires the `MANAGE_GUILD` permission. Returns the updated [guild widget](#DOCS_RESOURCES_GUILD/guild-widget-settings-object) object.
1050
-
1051
- > info
1052
- > This endpoint supports the `X-Audit-Log-Reason` header.
1053
-
1054
- ## Get Guild Widget % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget.json
1055
-
1056
- Returns the [widget](#DOCS_RESOURCES_GUILD/get-guild-widget-object) for the guild.
1057
-
1058
- ## Get Guild Vanity URL % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/vanity-url
1059
-
1060
- Returns a partial [invite](#DOCS_RESOURCES_INVITE/invite-object) object for guilds with that feature enabled. Requires the `MANAGE_GUILD` permission. `code` will be null if a vanity url for the guild is not set.
1061
-
1062
- ###### Example Partial Invite Object
1063
-
1064
- ```json
1065
- {
1066
- "code": "abc",
1067
- "uses": 12
1068
- }
1069
- ```
1070
-
1071
- ## Get Guild Widget Image % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget.png
1072
-
1073
- Returns a PNG image widget for the guild. Requires no permissions or authentication.
1074
-
1075
- > info
1076
- > All parameters to this endpoint are optional.
1077
-
1078
- ###### Query String Params
1079
-
1080
- | Field | Type | Description | Default |
1081
- | ----- | ------ | ---------------------------------------------- | ------- |
1082
- | style | string | style of the widget image returned (see below) | shield |
1083
-
1084
- ###### Widget Style Options
1085
-
1086
- | Value | Description | Example |
1087
- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
1088
- | shield | shield style widget with Discord icon and guild members online count | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=shield) |
1089
- | banner1 | large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner1) |
1090
- | banner2 | smaller widget style with guild icon, name and online count. Split on the right with Discord logo | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner2) |
1091
- | banner3 | large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner3) |
1092
- | banner4 | large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget and a "JOIN MY SERVER" button at the bottom | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner4) |
1093
-
1094
- ## Get Guild Welcome Screen % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/welcome-screen
1095
-
1096
- Returns the [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object for the guild. If the welcome screen is not enabled, the `MANAGE_GUILD` permission is required.
1097
-
1098
- ## Modify Guild Welcome Screen % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/welcome-screen
1099
-
1100
- Modify the guild's [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object). Requires the `MANAGE_GUILD` permission. Returns the updated [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object.
1101
-
1102
- > info
1103
- > All parameters to this endpoint are optional and nullable
1104
-
1105
- > info
1106
- > This endpoint supports the `X-Audit-Log-Reason` header.
1107
-
1108
- ###### JSON Params
1109
-
1110
- | Field | Type | Description |
1111
- | ---------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
1112
- | enabled | boolean | whether the welcome screen is enabled |
1113
- | welcome_channels | array of [welcome screen channel](#DOCS_RESOURCES_GUILD/welcome-screen-object-welcome-screen-channel-structure) objects | channels linked in the welcome screen and their display options |
1114
- | description | string | the server description to show in the welcome screen |
1115
-
1116
- ## Modify Current User Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/@me
1117
-
1118
- Updates the current user's voice state. Returns `204 No Content` on success.
1119
-
1120
- ###### JSON Params
1121
-
1122
- | Field | Type | Description |
1123
- | --------------------------- | ------------------ | ---------------------------------------------- |
1124
- | channel_id | snowflake | the id of the channel the user is currently in |
1125
- | suppress? | boolean | toggles the user's suppress state |
1126
- | request_to_speak_timestamp? | ?ISO8601 timestamp | sets the user's request to speak |
1127
-
1128
- ###### Caveats
1129
-
1130
- There are currently several caveats for this endpoint:
1131
-
1132
- - `channel_id` must currently point to a stage channel.
1133
- - current user must already have joined `channel_id`.
1134
- - You must have the `MUTE_MEMBERS` permission to unsuppress yourself. You can always suppress yourself.
1135
- - You must have the `REQUEST_TO_SPEAK` permission to request to speak. You can always clear your own request to speak.
1136
- - You are able to set `request_to_speak_timestamp` to any present or future time.
1137
-
1138
- ## Modify User Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/{user.id#DOCS_RESOURCES_USER/user-object}
1139
-
1140
- Updates another user's voice state.
1141
-
1142
- ###### JSON Params
1143
-
1144
- | Field | Type | Description |
1145
- | ---------- | --------- | ---------------------------------------------- |
1146
- | channel_id | snowflake | the id of the channel the user is currently in |
1147
- | suppress? | boolean | toggles the user's suppress state |
1148
-
1149
- ###### Caveats
1150
-
1151
- There are currently several caveats for this endpoint:
1152
-
1153
- - `channel_id` must currently point to a stage channel.
1154
- - User must already have joined `channel_id`.
1155
- - You must have the `MUTE_MEMBERS` permission. (Since suppression is the only thing that is available currently.)
1156
- - When unsuppressed, non-bot users will have their `request_to_speak_timestamp` set to the current time. Bot users will not.
1157
- - When suppressed, the user will have their `request_to_speak_timestamp` removed.