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,273 +0,0 @@
1
- # Guild Scheduled Event
2
-
3
- A representation of a scheduled event in a [guild](#DOCS_RESOURCES_GUILD/).
4
-
5
- ### Guild Scheduled Event Object
6
-
7
- ###### Guild Scheduled Event Structure
8
-
9
- | Field | Type | Description |
10
- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | id | snowflake | the id of the scheduled event |
12
- | guild_id | snowflake | the guild id which the scheduled event belongs to |
13
- | channel_id ** | ?snowflake | the channel id in which the scheduled event will be hosted, or `null` if [scheduled entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) is `EXTERNAL` |
14
- | creator_id? * | ?snowflake | the id of the user that created the scheduled event * |
15
- | name | string | the name of the scheduled event (1-100 characters) |
16
- | description? | ?string | the description of the scheduled event (1-1000 characters) |
17
- | scheduled_start_time | ISO8601 timestamp | the time the scheduled event will start |
18
- | scheduled_end_time ** | ?ISO8601 timestamp | the time the scheduled event will end, required if entity_type is `EXTERNAL` |
19
- | privacy_level | [privacy level](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event |
20
- | status | [event status](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event |
21
- | entity_type | [scheduled entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the type of the scheduled event |
22
- | entity_id | ?snowflake | the id of an entity associated with a guild scheduled event |
23
- | entity_metadata ** | ?[entity metadata](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | additional metadata for the guild scheduled event |
24
- | creator? | [user](#DOCS_RESOURCES_USER/user-object) object | the user that created the scheduled event |
25
- | user_count? | integer | the number of users subscribed to the scheduled event |
26
- | image? | ?string | the [cover image hash](#DOCS_REFERENCE/image-formatting) of the scheduled event |
27
-
28
-
29
- \* `creator_id` will be null and `creator` will not be included for events created before October 25th, 2021, when the concept of `creator_id` was introduced and tracked.
30
-
31
- \** See [field requirements by entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type) to understand the relationship between `entity_type` and the following fields: `channel_id`, `entity_metadata`, and `scheduled_end_time`
32
-
33
- ###### Guild Scheduled Event Privacy Level
34
-
35
- | Level | Value | Description |
36
- | ---------- | ----- | -------------------------------------------------------- |
37
- | GUILD_ONLY | 2 | the scheduled event is only accessible to guild members |
38
-
39
- ###### Guild Scheduled Event Entity Types
40
-
41
- | Type | Value |
42
- | -------------- | ----- |
43
- | STAGE_INSTANCE | 1 |
44
- | VOICE | 2 |
45
- | EXTERNAL | 3 |
46
-
47
- ###### Field Requirements By Entity Type
48
-
49
- The following table shows field requirements based on current entity type.
50
-
51
- `value` : This field is required to be a non-null value
52
-
53
- `null` : This field is required to be null
54
-
55
- `-` : No strict requirements
56
-
57
- | Entity Type | channel_id | entity_metadata | scheduled_end_time |
58
- | -------------- | ---------- | --------------- | ------------------ |
59
- | STAGE_INSTANCE | value | null | - |
60
- | VOICE | value | null | - |
61
- | EXTERNAL | null | value * | value |
62
-
63
- \* `entity_metadata` with a non-null `location` must be provided
64
-
65
-
66
- ###### Guild Scheduled Event Status
67
-
68
- | Type | Value |
69
- | ----------- | ----- |
70
- | SCHEDULED | 1 |
71
- | ACTIVE | 2 |
72
- | COMPLETED * | 3 |
73
- | CANCELED * | 4 |
74
-
75
- \* Once `status` is set to `COMPLETED` or `CANCELED`, the `status` can no longer be updated
76
-
77
- ###### Valid Guild Scheduled Event Status Transitions
78
-
79
- SCHEDULED --> ACTIVE
80
-
81
- ACTIVE --------> COMPLETED
82
-
83
- SCHEDULED --> CANCELED
84
-
85
-
86
- ###### Guild Scheduled Event Entity Metadata
87
-
88
- | Field | Type | Description |
89
- | ------------ | ------------------- | ---------------------------------------- |
90
- | location? * | string | location of the event (1-100 characters) |
91
-
92
- \* [required](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) for events with `'entity_type': EXTERNAL`
93
-
94
- ### Guild Scheduled Event User Object
95
-
96
- ###### Guild Scheduled Event User Structure
97
-
98
- | Field | Type | Description |
99
- | -------------------- | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
100
- | guild_scheduled_event_id | snowflake | the scheduled event id which the user subscribed to |
101
- | user | [user](#DOCS_RESOURCES_USER/user-object) | user which subscribed to an event |
102
- | member? | [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) | guild member data for this user for the guild which this event belongs to, if any |
103
-
104
-
105
- ## List Scheduled Events for Guild % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/scheduled-events
106
-
107
- Returns a list of [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) objects for the given guild.
108
-
109
- ###### Query String Params
110
-
111
- | Field | Type | Description |
112
- | ---------------- | ------- | ------------------------------------------------ |
113
- | with_user_count? | boolean | include number of users subscribed to each event |
114
-
115
- ## Create Guild Scheduled Event % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/scheduled-events
116
-
117
- Create a guild scheduled event in the guild. Returns a [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object on success.
118
-
119
- > info
120
- > A guild can have a maximum of 100 events with `SCHEDULED` or `ACTIVE` status at any time.
121
-
122
- > info
123
- > This endpoint supports the `X-Audit-Log-Reason` header.
124
-
125
- ###### JSON Params
126
-
127
- | Field | Type | Description |
128
- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
129
- | channel_id? * | snowflake * | the channel id of the scheduled event. |
130
- | entity_metadata? ** | [entity metadata](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event |
131
- | name | string | the name of the scheduled event |
132
- | privacy_level | [privacy level](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event |
133
- | scheduled_start_time | ISO8601 timestamp | the time to schedule the scheduled event |
134
- | scheduled_end_time? ** | ISO8601 timestamp | the time when the scheduled event is scheduled to end |
135
- | description? | string | the description of the scheduled event |
136
- | entity_type | [entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event |
137
- | image? | [image data](#DOCS_REFERENCE/image-data) | the cover image of the scheduled event |
138
-
139
- \* Optional for events with `'entity_type': EXTERNAL`
140
-
141
- \*\* Required for events with `'entity_type': EXTERNAL`
142
-
143
- ## Get Guild Scheduled Event % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/scheduled-events/{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object}
144
-
145
- Get a guild scheduled event. Returns a [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object on success.
146
-
147
- ###### Query String Params
148
-
149
- | Field | Type | Description |
150
- | ---------------- | ------- | ------------------------------------------------ |
151
- | with_user_count? | boolean | include number of users subscribed to this event |
152
-
153
- ## Modify Guild Scheduled Event % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/scheduled-events/{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object}
154
-
155
- Modify a guild scheduled event. Returns the modified [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object on success.
156
-
157
- > info
158
- > To start or end an event, use this endpoint to modify the event's [status](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) field.
159
-
160
- > info
161
- > This endpoint supports the `X-Audit-Log-Reason` header.
162
-
163
- > info
164
- > This endpoint silently discards `entity_metadata` for non-`EXTERNAL` events.
165
-
166
- ###### JSON Params
167
-
168
- | Field | Type | Description |
169
- | --------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
170
- | channel_id? * | ?snowflake | the channel id of the scheduled event, set to `null` if changing entity type to `EXTERNAL` |
171
- | entity_metadata? | ?[entity metadata](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event |
172
- | name? | string | the name of the scheduled event |
173
- | privacy_level? | [privacy level](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event |
174
- | scheduled_start_time? | ISO8601 timestamp | the time to schedule the scheduled event |
175
- | scheduled_end_time? * | ISO8601 timestamp | the time when the scheduled event is scheduled to end |
176
- | description? | ?string | the description of the scheduled event |
177
- | entity_type? * | [event entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event |
178
- | status? | [event status](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event |
179
- | image? | [image data](#DOCS_REFERENCE/image-data) | the cover image of the scheduled event |
180
-
181
- \* If updating `entity_type` to `EXTERNAL`:
182
-
183
- - `channel_id` is required and [must be set to null](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type)
184
- - `entity_metadata` with a `location` field must be provided
185
- - `scheduled_end_time` must be provided
186
-
187
- ## Delete Guild Scheduled Event % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/scheduled-events/{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object}
188
-
189
- Delete a guild scheduled event. Returns a `204` on success.
190
-
191
- ## Get Guild Scheduled Event Users % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/scheduled-events/{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object}/users
192
-
193
- Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of [guild scheduled event user](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-user-object) objects on success. Guild member data, if it exists, is included if the `with_member` query parameter is set.
194
-
195
- ###### Query String Params
196
-
197
- | Field | Type | Description | Default |
198
- | ------------ | ------- | ------------------------------------------------------------------------------ | ------- |
199
- | limit? | number | number of users to return (up to maximum 100) | 100 |
200
- | with_member? | boolean | include guild member data if it exists | false |
201
- | before? * | snowflake | consider only users before given user id | null |
202
- | after? * | snowflake | consider only users after given user id | null |
203
-
204
- \* Provide a user id to `before` and `after` for pagination. Users will always be returned in ascending order by `user_id`. If both `before` and `after` are provided, only `before` is respected. Fetching users in-between `before` and `after` is not supported.
205
-
206
-
207
- ## Guild Scheduled Event Status Update Automation
208
-
209
- NOTE: `status` and `entity_type` here are expressed by name rather than their value for readability
210
-
211
- ### An active scheduled event for a stage channel where all users have left the stage channel will automatically end a few minutes after the last user leaves the channel
212
-
213
- When an event with `'status': ACTIVE` and `'entity_type': STAGE_INSTANCE` has no users connected to the stage channel for a certain period of time (on the order of minutes), the event `status` will be automatically set to `COMPLETED`.
214
-
215
- ### An active scheduled event for a voice channel where all users have left the voice channel will automatically end a few minutes after the last user leaves the channel
216
-
217
- When an event with `'status': ACTIVE` and `'entity_type': VOICE` has no users connected to the voice channel for a certain period of time (on the order of minutes), the event `status` will be automatically set to `COMPLETED`.
218
-
219
- ### An external event will automatically begin at its scheduled start time
220
-
221
- An event with `'entity_type': EXTERNAL` at its `scheduled_start_time` will automatically have `status` set to `ACTIVE`.
222
-
223
- ### An external event will automatically end at its scheduled end time
224
-
225
- An event with `'entity_type': EXTERNAL` at its `scheduled_end_time` will automatically have `status` set to `COMPLETED`.
226
-
227
- ### Any scheduled event which has not begun after its scheduled start time will be automatically cancelled after a few hours
228
-
229
- Any event with `'status': SCHEDULED` after a certain time interval (on the order of hours) beyond its `scheduled_start_time` will have its `status` automatically set to `CANCELLED`.
230
-
231
- ## Guild Scheduled Event Permissions Requirements
232
-
233
- NOTE: `entity_type` is expressed by name rather than value for readability
234
-
235
- > info
236
- > A user must be a member of the guild in order to access events for that guild unless the guild is lurkable. If a guild is lurkable,
237
- > events in that guild may be visible to lurkers depending on the event type and the permissions of any channels associated with the event.
238
-
239
- ### Permissions to create an event with entity_type: STAGE_INSTANCE
240
-
241
- #### Write Permissions (CREATE / UPDATE)
242
-
243
- - `MANAGE_EVENTS` at the guild level or at least `MANAGE_EVENTS` for the `channel_id` associated with the event
244
- - `MANAGE_CHANNELS`
245
- - `MUTE_MEMBERS`
246
- - `MOVE_MEMBERS`
247
-
248
- #### Read Permissions (GET)
249
-
250
- - `VIEW_CHANNEL` for `channel_id` associated with the event
251
-
252
- ### Permissions to create an event with entity_type: VOICE
253
-
254
- #### Write Permissions (CREATE / UPDATE)
255
-
256
- - `MANAGE_EVENTS` at the guild level or `MANAGE_EVENTS` for the `channel_id` associated with the event
257
- - `VIEW_CHANNEL` for `channel_id` associated with event
258
- - `CONNECT` for `channel_id` associated with event
259
-
260
- #### Read Permissions (GET)
261
-
262
- - `VIEW_CHANNEL` for `channel_id` associated with the event
263
-
264
-
265
- ### Permissions to create an event with entity_type: EXTERNAL
266
-
267
- #### Write Permissions (CREATE / UPDATE)
268
-
269
- - `MANAGE_EVENTS` at the guild level
270
-
271
- #### Read Permissions (GET)
272
-
273
- * *No other permissions required*
@@ -1,148 +0,0 @@
1
- # Guild Template Resource
2
-
3
- ### Guild Template Object
4
-
5
- Represents a code that when used, creates a guild based on a snapshot of an existing guild.
6
-
7
- ###### Guild Template Structure
8
-
9
- | Field | Type | Description |
10
- |-------------------------|------------------------------------------------------------|--------------------------------------------------------|
11
- | code | string | the template code (unique ID) |
12
- | name | string | template name |
13
- | description | ?string | the description for the template |
14
- | usage_count | integer | number of times this template has been used |
15
- | creator_id | snowflake | the ID of the user who created the template |
16
- | creator | [user](#DOCS_RESOURCES_USER/user-object) object | the user who created the template |
17
- | created_at | ISO8601 timestamp | when this template was created |
18
- | updated_at | ISO8601 timestamp | when this template was last synced to the source guild |
19
- | source_guild_id | snowflake | the ID of the guild this template is based on |
20
- | serialized_source_guild | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | the guild snapshot this template contains |
21
- | is_dirty | ?boolean | whether the template has unsynced changes |
22
-
23
- ###### Example Guild Template Object
24
-
25
- ```json
26
- {
27
- "code": "hgM48av5Q69A",
28
- "name": "Friends & Family",
29
- "description": "",
30
- "usage_count": 49605,
31
- "creator_id": "132837293881950208",
32
- "creator": {
33
- "id": "132837293881950208",
34
- "username": "hoges",
35
- "avatar": "79b0d9f8c340f2d43e1f78b09f175b62",
36
- "discriminator": "0001",
37
- "public_flags": 129
38
- },
39
- "created_at": "2020-04-02T21:10:38+00:00",
40
- "updated_at": "2020-05-01T17:57:38+00:00",
41
- "source_guild_id": "678070694164299796",
42
- "serialized_source_guild": {
43
- "name": "Friends & Family",
44
- "description": null,
45
- "region": "us-west",
46
- "verification_level": 0,
47
- "default_message_notifications": 0,
48
- "explicit_content_filter": 0,
49
- "preferred_locale": "en-US",
50
- "afk_timeout": 300,
51
- "roles": [
52
- {
53
- "id": 0,
54
- "name": "@everyone",
55
- "permissions": 104324689,
56
- "color": 0,
57
- "hoist": false,
58
- "mentionable": false
59
- }
60
- ],
61
- "channels": [
62
- {
63
- "name": "Text Channels",
64
- "position": 1,
65
- "topic": null,
66
- "bitrate": 64000,
67
- "user_limit": 0,
68
- "nsfw": false,
69
- "rate_limit_per_user": 0,
70
- "parent_id": null,
71
- "permission_overwrites": [],
72
- "id": 1,
73
- "type": 4
74
- },
75
- {
76
- "name": "general",
77
- "position": 1,
78
- "topic": null,
79
- "bitrate": 64000,
80
- "user_limit": 0,
81
- "nsfw": false,
82
- "rate_limit_per_user": 0,
83
- "parent_id": 1,
84
- "permission_overwrites": [],
85
- "id": 2,
86
- "type": 0
87
- }
88
- ],
89
- "afk_channel_id": null,
90
- "system_channel_id": 2,
91
- "system_channel_flags": 0,
92
- "icon_hash": null
93
- },
94
- "is_dirty": null
95
- }
96
- ```
97
-
98
- ## Get Guild Template % GET /guilds/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object}
99
-
100
- Returns a [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object for the given code.
101
-
102
- ## Create Guild from Guild Template % POST /guilds/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object}
103
-
104
- Create a new guild based on a template. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object on success. Fires a [Guild Create](#DOCS_TOPICS_GATEWAY/guild-create) Gateway event.
105
-
106
- > warn
107
- > This endpoint can be used only by bots in less than 10 guilds.
108
-
109
- ###### JSON Params
110
-
111
- | Field | Type | Description |
112
- |-------|------------------------------------------|-----------------------------------------|
113
- | name | string | name of the guild (2-100 characters) |
114
- | icon? | [image data](#DOCS_REFERENCE/image-data) | base64 128x128 image for the guild icon |
115
-
116
- ## Get Guild Templates % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates
117
-
118
- Returns an array of [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) objects. Requires the `MANAGE_GUILD` permission.
119
-
120
- ## Create Guild Template % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates
121
-
122
- Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Returns the created [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success.
123
-
124
- ###### JSON Params
125
-
126
- | Field | Type | Description |
127
- |--------------|---------|-------------------------------------------------|
128
- | name | string | name of the template (1-100 characters) |
129
- | description? | ?string | description for the template (0-120 characters) |
130
-
131
- ## Sync Guild Template % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object}
132
-
133
- Syncs the template to the guild's current state. Requires the `MANAGE_GUILD` permission. Returns the [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success.
134
-
135
- ## Modify Guild Template % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object}
136
-
137
- Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Returns the [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success.
138
-
139
- ###### JSON Params
140
-
141
- | Field | Type | Description |
142
- |--------------|---------|-------------------------------------------------|
143
- | name? | string | name of the template (1-100 characters) |
144
- | description? | ?string | description for the template (0-120 characters) |
145
-
146
- ## Delete Guild Template % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object}
147
-
148
- Deletes the template. Requires the `MANAGE_GUILD` permission. Returns the deleted [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success.
@@ -1,150 +0,0 @@
1
- # Invite Resource
2
-
3
- ### Invite Object
4
-
5
- Represents a code that when used, adds a user to a guild or group DM channel.
6
-
7
- ###### Invite Structure
8
-
9
- | Field | Type | Description |
10
- | --------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | code | string | the invite code (unique ID) |
12
- | guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | the guild this invite is for |
13
- | channel | ?partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | the channel this invite is for |
14
- | inviter? | [user](#DOCS_RESOURCES_USER/user-object) object | the user who created the invite |
15
- | target_type? | integer | the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite |
16
- | target_user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user whose stream to display for this voice channel stream invite |
17
- | target_application? | partial [application](#DOCS_RESOURCES_APPLICATION/application-object) object | the embedded application to open for this voice channel embedded application invite |
18
- | approximate_presence_count? | integer | approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` |
19
- | approximate_member_count? | integer | approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true` |
20
- | expires_at? | ?ISO8601 timestamp | the expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true` |
21
- | stage_instance? | [invite stage instance](#DOCS_RESOURCES_INVITE/invite-stage-instance-object) object | stage instance data if there is a [public Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE) in the Stage channel this invite is for (deprecated) |
22
- | guild_scheduled_event? | [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object | guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id |
23
-
24
- ###### Invite Target Types
25
-
26
- | Type | Value |
27
- |----------------------|-------|
28
- | STREAM | 1 |
29
- | EMBEDDED_APPLICATION | 2 |
30
-
31
- ###### Example Invite Object
32
-
33
- ```json
34
- {
35
- "code": "0vCdhLbwjZZTWZLD",
36
- "guild": {
37
- "id": "165176875973476352",
38
- "name": "CS:GO Fraggers Only",
39
- "splash": null,
40
- "banner": null,
41
- "description": "Very good description",
42
- "icon": null,
43
- "features": ["NEWS", "DISCOVERABLE"],
44
- "verification_level": 2,
45
- "vanity_url_code": null,
46
- "nsfw_level": 0,
47
- "premium_subscription_count": 5
48
- },
49
- "channel": {
50
- "id": "165176875973476352",
51
- "name": "illuminati",
52
- "type": 0
53
- },
54
- "inviter": {
55
- "id": "115590097100865541",
56
- "username": "speed",
57
- "avatar": "deadbeef",
58
- "discriminator": "7653",
59
- "public_flags": 131328
60
- },
61
- "target_type": 1,
62
- "target_user": {
63
- "id": "165176875973476352",
64
- "username": "bob",
65
- "avatar": "deadbeef",
66
- "discriminator": "1234",
67
- "public_flags": 64
68
- }
69
- }
70
- ```
71
-
72
- ### Invite Metadata Object
73
-
74
- Extra information about an invite, will extend the [invite](#DOCS_RESOURCES_INVITE/invite-object) object.
75
-
76
- ###### Invite Metadata Structure
77
-
78
- | Field | Type | Description |
79
- | ---------- | ----------------------------------------------- | ---------------------------------------------------- |
80
- | uses | integer | number of times this invite has been used |
81
- | max_uses | integer | max number of times this invite can be used |
82
- | max_age | integer | duration (in seconds) after which the invite expires |
83
- | temporary | boolean | whether this invite only grants temporary membership |
84
- | created_at | ISO8601 timestamp | when this invite was created |
85
-
86
- ###### Example Invite Metadata
87
-
88
- ```json
89
- {
90
- "uses": 0,
91
- "max_uses": 0,
92
- "max_age": 0,
93
- "temporary": false,
94
- "created_at": "2016-03-31T19:15:39.954000+00:00"
95
- }
96
- ```
97
-
98
- ### Invite Stage Instance Object
99
-
100
- > warn
101
- > This is deprecated.
102
-
103
- ###### Invite Stage Instance Structure
104
-
105
- | Field | Type | Description |
106
- |-------------------|------------------------------------------------------------------------------------|----------------------------------------------------|
107
- | members | array of partial [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects | the members speaking in the Stage |
108
- | participant_count | integer | the number of users in the Stage |
109
- | speaker_count | integer | the number of users speaking in the Stage |
110
- | topic | string | the topic of the Stage instance (1-120 characters) |
111
-
112
- ###### Example Invite Stage Instance
113
-
114
- ```json
115
- {
116
- "topic": "The debate is over: diet is better than regular",
117
- "participant_count": 200,
118
- "speaker_count": 5 ,
119
- "members": [
120
- {
121
- "roles": [],
122
- "nick": "NOT API SUPPORT",
123
- "avatar": null,
124
- "premium_since": null,
125
- "joined_at": "2015-04-26T06:26:56.936000+00:00",
126
- "pending": false,
127
- "user": {}
128
- }
129
- ]
130
- }
131
- ```
132
-
133
- ## Get Invite % GET /invites/{invite.code#DOCS_RESOURCES_INVITE/invite-object}
134
-
135
- Returns an [invite](#DOCS_RESOURCES_INVITE/invite-object) object for the given code.
136
-
137
- ###### Query String Params
138
-
139
- | Field | Type | Description |
140
- | ------------------------- | --------- | ----------------------------------------------------------- |
141
- | with_counts? | boolean | whether the invite should contain approximate member counts |
142
- | with_expiration? | boolean | whether the invite should contain the expiration date |
143
- | guild_scheduled_event_id? | snowflake | the guild scheduled event to include with the invite |
144
-
145
- ## Delete Invite % DELETE /invites/{invite.code#DOCS_RESOURCES_INVITE/invite-object}
146
-
147
- Delete an invite. Requires the `MANAGE_CHANNELS` permission on the channel this invite belongs to, or `MANAGE_GUILD` to remove any invite across the guild. Returns an [invite](#DOCS_RESOURCES_INVITE/invite-object) object on success. Fires a [Invite Delete](#DOCS_TOPICS_GATEWAY/invite-delete) Gateway event.
148
-
149
- > info
150
- > This endpoint supports the `X-Audit-Log-Reason` header.