dfx 0.0.3 → 0.1.0

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 (115) hide show
  1. package/DiscordConfig/index.d.ts +29 -0
  2. package/DiscordConfig/index.js +31 -0
  3. package/DiscordConfig/index.js.map +1 -0
  4. package/DiscordConfig/index.ts +45 -0
  5. package/DiscordGateway/index.d.ts +23 -0
  6. package/DiscordGateway/index.js +25 -0
  7. package/DiscordGateway/index.js.map +1 -0
  8. package/DiscordGateway/index.ts +34 -0
  9. package/DiscordGateway/utils.d.ts +3 -0
  10. package/DiscordGateway/utils.js +12 -0
  11. package/DiscordGateway/utils.js.map +1 -0
  12. package/DiscordGateway/utils.ts +17 -0
  13. package/DiscordREST/http.d.ts +3 -0
  14. package/DiscordREST/http.js +20 -0
  15. package/DiscordREST/http.js.map +1 -0
  16. package/DiscordREST/http.ts +21 -0
  17. package/DiscordREST/index.d.ts +11 -0
  18. package/DiscordREST/index.js +65 -0
  19. package/DiscordREST/index.js.map +1 -0
  20. package/DiscordREST/index.ts +83 -0
  21. package/DiscordREST/types.d.ts +12 -0
  22. package/DiscordREST/types.ts +9 -1
  23. package/DiscordShard/commands.d.ts +7 -0
  24. package/DiscordShard/commands.js +38 -0
  25. package/DiscordShard/commands.js.map +1 -0
  26. package/DiscordShard/commands.ts +40 -0
  27. package/DiscordShard/heartbeats.d.ts +6 -0
  28. package/DiscordShard/heartbeats.js +29 -0
  29. package/DiscordShard/heartbeats.js.map +1 -0
  30. package/DiscordShard/heartbeats.ts +65 -0
  31. package/DiscordShard/identify.d.ts +15 -0
  32. package/DiscordShard/identify.js +35 -0
  33. package/DiscordShard/identify.js.map +1 -0
  34. package/DiscordShard/identify.ts +75 -0
  35. package/DiscordShard/index.d.ts +32 -0
  36. package/DiscordShard/index.js +63 -0
  37. package/DiscordShard/index.js.map +1 -0
  38. package/DiscordShard/index.ts +122 -0
  39. package/DiscordShard/invalidSession.d.ts +6 -0
  40. package/DiscordShard/invalidSession.js +17 -0
  41. package/DiscordShard/invalidSession.js.map +1 -0
  42. package/DiscordShard/invalidSession.ts +24 -0
  43. package/DiscordShard/utils.d.ts +7 -0
  44. package/DiscordShard/utils.js +17 -0
  45. package/DiscordShard/utils.js.map +1 -0
  46. package/DiscordShard/utils.ts +32 -0
  47. package/DiscordWS/index.d.ts +33 -0
  48. package/DiscordWS/index.js +37 -0
  49. package/DiscordWS/index.js.map +1 -1
  50. package/DiscordWS/index.ts +76 -0
  51. package/Log/index.d.ts +15 -0
  52. package/Log/index.js +28 -0
  53. package/Log/index.js.map +1 -0
  54. package/Log/index.ts +30 -0
  55. package/Utils/memoize.d.ts +3 -0
  56. package/Utils/memoize.js +16 -0
  57. package/Utils/memoize.js.map +1 -0
  58. package/Utils/memoize.ts +15 -0
  59. package/WS/index.d.ts +30 -0
  60. package/WS/index.js +19 -20
  61. package/WS/index.js.map +1 -1
  62. package/WS/index.ts +42 -51
  63. package/bot.d.ts +1 -0
  64. package/bot.js +28 -0
  65. package/bot.js.map +1 -0
  66. package/bot.ts +50 -0
  67. package/esm/DiscordConfig/index.js +26 -0
  68. package/esm/DiscordConfig/index.js.map +1 -0
  69. package/esm/DiscordGateway/index.js +20 -0
  70. package/esm/DiscordGateway/index.js.map +1 -0
  71. package/esm/DiscordGateway/utils.js +7 -0
  72. package/esm/DiscordGateway/utils.js.map +1 -0
  73. package/esm/DiscordREST/http.js +15 -0
  74. package/esm/DiscordREST/http.js.map +1 -0
  75. package/esm/DiscordREST/index.js +61 -0
  76. package/esm/DiscordREST/index.js.map +1 -0
  77. package/esm/DiscordREST/types.js +3 -0
  78. package/esm/DiscordREST/types.js.map +1 -0
  79. package/esm/DiscordShard/commands.js +28 -0
  80. package/esm/DiscordShard/commands.js.map +1 -0
  81. package/esm/DiscordShard/heartbeats.js +24 -0
  82. package/esm/DiscordShard/heartbeats.js.map +1 -0
  83. package/esm/DiscordShard/identify.js +30 -0
  84. package/esm/DiscordShard/identify.js.map +1 -0
  85. package/esm/DiscordShard/index.js +58 -0
  86. package/esm/DiscordShard/index.js.map +1 -0
  87. package/esm/DiscordShard/invalidSession.js +12 -0
  88. package/esm/DiscordShard/invalidSession.js.map +1 -0
  89. package/esm/DiscordShard/utils.js +11 -0
  90. package/esm/DiscordShard/utils.js.map +1 -0
  91. package/esm/DiscordWS/index.js +34 -0
  92. package/esm/DiscordWS/index.js.map +1 -0
  93. package/esm/Log/index.js +22 -0
  94. package/esm/Log/index.js.map +1 -0
  95. package/esm/Utils/memoize.js +12 -0
  96. package/esm/Utils/memoize.js.map +1 -0
  97. package/esm/WS/index.js +65 -0
  98. package/esm/WS/index.js.map +1 -0
  99. package/esm/bot.js +25 -0
  100. package/esm/bot.js.map +1 -0
  101. package/esm/mod.js +16 -0
  102. package/esm/mod.js.map +1 -0
  103. package/esm/types.js +1559 -0
  104. package/esm/types.js.map +1 -0
  105. package/mod.d.ts +7 -0
  106. package/mod.js +18 -7
  107. package/mod.js.map +1 -1
  108. package/mod.ts +17 -22
  109. package/package.json +39 -6
  110. package/types.d.ts +3598 -0
  111. package/types.js +2 -1
  112. package/types.js.map +1 -1
  113. package/types.ts +170 -149
  114. package/websocket.js +0 -11
  115. package/websocket.js.map +0 -1
package/types.d.ts ADDED
@@ -0,0 +1,3598 @@
1
+ import { Response } from "./DiscordREST/types";
2
+ export interface ActionRow {
3
+ /** component type */
4
+ type: ComponentType;
5
+ /** a list of child components */
6
+ components: Component[];
7
+ }
8
+ export interface Activity {
9
+ /** the activity's name */
10
+ name: string;
11
+ /** activity type */
12
+ type: ActivityType;
13
+ /** stream url, is validated when type is 1 */
14
+ url?: string | null;
15
+ /** unix timestamp (in milliseconds) of when the activity was added to the user's session */
16
+ created_at: number;
17
+ /** unix timestamps for start and/or end of the game */
18
+ timestamps?: ActivityTimestamp;
19
+ /** application id for the game */
20
+ application_id?: Snowflake;
21
+ /** what the player is currently doing */
22
+ details?: string | null;
23
+ /** the user's current party status */
24
+ state?: string | null;
25
+ /** the emoji used for a custom status */
26
+ emoji?: ActivityEmoji | null;
27
+ /** information for the current party of the player */
28
+ party?: ActivityParty;
29
+ /** images for the presence and their hover texts */
30
+ assets?: ActivityAsset;
31
+ /** secrets for Rich Presence joining and spectating */
32
+ secrets?: ActivitySecret;
33
+ /** whether or not the activity is an instanced game session */
34
+ instance?: boolean;
35
+ /** activity flags ORd together, describes what the payload includes */
36
+ flags?: number;
37
+ /** the custom buttons shown in the Rich Presence (max 2) */
38
+ buttons?: ActivityButton[];
39
+ }
40
+ export interface ActivityAsset {
41
+ /** see Activity Asset Image */
42
+ large_image?: string;
43
+ /** text displayed when hovering over the large image of the activity */
44
+ large_text?: string;
45
+ /** see Activity Asset Image */
46
+ small_image?: string;
47
+ /** text displayed when hovering over the small image of the activity */
48
+ small_text?: string;
49
+ }
50
+ export interface ActivityButton {
51
+ /** the text shown on the button (1-32 characters) */
52
+ label: string;
53
+ /** the url opened when clicking the button (1-512 characters) */
54
+ url: string;
55
+ }
56
+ export interface ActivityEmoji {
57
+ /** the name of the emoji */
58
+ name: string;
59
+ /** the id of the emoji */
60
+ id?: Snowflake;
61
+ /** whether this emoji is animated */
62
+ animated?: boolean;
63
+ }
64
+ export declare const ActivityFlag: {
65
+ readonly INSTANCE: number;
66
+ readonly JOIN: number;
67
+ readonly SPECTATE: number;
68
+ readonly JOIN_REQUEST: number;
69
+ readonly SYNC: number;
70
+ readonly PLAY: number;
71
+ readonly PARTY_PRIVACY_FRIENDS: number;
72
+ readonly PARTY_PRIVACY_VOICE_CHANNEL: number;
73
+ readonly EMBEDDED: number;
74
+ };
75
+ export interface ActivityParty {
76
+ /** the id of the party */
77
+ id?: string;
78
+ /** used to show the party's current and maximum size */
79
+ size?: number[];
80
+ }
81
+ export interface ActivitySecret {
82
+ /** the secret for joining a party */
83
+ join?: string;
84
+ /** the secret for spectating a game */
85
+ spectate?: string;
86
+ /** the secret for a specific instanced match */
87
+ match?: string;
88
+ }
89
+ export interface ActivityTimestamp {
90
+ /** unix time (in milliseconds) of when the activity started */
91
+ start?: number;
92
+ /** unix time (in milliseconds) of when the activity ends */
93
+ end?: number;
94
+ }
95
+ export declare enum ActivityType {
96
+ GAME = 0,
97
+ STREAMING = 1,
98
+ LISTENING = 2,
99
+ WATCHING = 3,
100
+ CUSTOM = 4,
101
+ COMPETING = 5
102
+ }
103
+ export interface AddGuildMemberParams {
104
+ /** an oauth2 access token granted with the guilds.join to the bot's application for the user you want to add to the guild */
105
+ access_token: string;
106
+ /** value to set user's nickname to */
107
+ nick: string;
108
+ /** array of role ids the member is assigned */
109
+ roles: Snowflake[];
110
+ /** whether the user is muted in voice channels */
111
+ mute: boolean;
112
+ /** whether the user is deafened in voice channels */
113
+ deaf: boolean;
114
+ }
115
+ export interface AllowedMention {
116
+ /** An array of allowed mention types to parse from the content. */
117
+ parse: AllowedMentionType[];
118
+ /** Array of role_ids to mention (Max size of 100) */
119
+ roles: Snowflake[];
120
+ /** Array of user_ids to mention (Max size of 100) */
121
+ users: Snowflake[];
122
+ /** For replies, whether to mention the author of the message being replied to (default false) */
123
+ replied_user: boolean;
124
+ }
125
+ export declare enum AllowedMentionType {
126
+ /** Controls role mentions */
127
+ ROLE_MENTIONS = "roles",
128
+ /** Controls user mentions */
129
+ USER_MENTIONS = "users",
130
+ /** Controls @everyone and @here mentions */
131
+ EVERYONE_MENTIONS = "everyone"
132
+ }
133
+ export interface Application {
134
+ /** the id of the app */
135
+ id: Snowflake;
136
+ /** the name of the app */
137
+ name: string;
138
+ /** the icon hash of the app */
139
+ icon?: string | null;
140
+ /** the description of the app */
141
+ description: string;
142
+ /** an array of rpc origin urls, if rpc is enabled */
143
+ rpc_origins?: string[];
144
+ /** when false only app owner can join the app's bot to guilds */
145
+ bot_public: boolean;
146
+ /** when true the app's bot will only join upon completion of the full oauth2 code grant flow */
147
+ bot_require_code_grant: boolean;
148
+ /** the url of the app's terms of service */
149
+ terms_of_service_url?: string;
150
+ /** the url of the app's privacy policy */
151
+ privacy_policy_url?: string;
152
+ /** partial user object containing info on the owner of the application */
153
+ owner?: User;
154
+ /** if this application is a game sold on Discord, this field will be the summary field for the store page of its primary sku */
155
+ summary: string;
156
+ /** the hex encoded key for verification in interactions and the GameSDK's GetTicket */
157
+ verify_key: string;
158
+ /** if the application belongs to a team, this will be a list of the members of that team */
159
+ team?: Team | null;
160
+ /** if this application is a game sold on Discord, this field will be the guild to which it has been linked */
161
+ guild_id?: Snowflake;
162
+ /** if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */
163
+ primary_sku_id?: Snowflake;
164
+ /** if this application is a game sold on Discord, this field will be the URL slug that links to the store page */
165
+ slug?: string;
166
+ /** the application's default rich presence invite cover image hash */
167
+ cover_image?: string;
168
+ /** the application's public flags */
169
+ flags?: number;
170
+ }
171
+ export interface ApplicationCommand {
172
+ /** unique id of the command */
173
+ id: Snowflake;
174
+ /** the type of command, defaults 1 if not set */
175
+ type?: ApplicationCommandType;
176
+ /** unique id of the parent application */
177
+ application_id: Snowflake;
178
+ /** guild id of the command, if not global */
179
+ guild_id?: Snowflake;
180
+ /** 1-32 character name */
181
+ name: string;
182
+ /** 1-100 character description for CHAT_INPUT commands, empty string for USER and MESSAGE commands */
183
+ description: string;
184
+ /** the parameters for the command, max 25 */
185
+ options?: ApplicationCommandOption[];
186
+ /** whether the command is enabled by default when the app is added to a guild */
187
+ default_permission?: boolean;
188
+ /** autoincrementing version identifier updated during substantial record changes */
189
+ version: Snowflake;
190
+ }
191
+ export interface ApplicationCommandInteractionDataOption {
192
+ /** the name of the parameter */
193
+ name: string;
194
+ /** value of application command option type */
195
+ type: ApplicationCommandOptionType;
196
+ /** the value of the option resulting from user input */
197
+ value?: string;
198
+ /** present if this option is a group or subcommand */
199
+ options?: ApplicationCommandInteractionDataOption[];
200
+ /** true if this option is the currently focused option for autocomplete */
201
+ focused?: boolean;
202
+ }
203
+ export interface ApplicationCommandOption {
204
+ /** the type of option */
205
+ type: any;
206
+ /** 1-32 character name */
207
+ name: string;
208
+ /** 1-100 character description */
209
+ description: string;
210
+ /** if the parameter is required or optional--default false */
211
+ required?: boolean;
212
+ /** choices for STRING, INTEGER, and NUMBER types for the user to pick from, max 25 */
213
+ choices?: ApplicationCommandOptionChoice[];
214
+ /** if the option is a subcommand or subcommand group type, these nested options will be the parameters */
215
+ options?: ApplicationCommandOption[];
216
+ /** if the option is a channel type, the channels shown will be restricted to these types */
217
+ channel_types?: ChannelType[];
218
+ /** if the option is an INTEGER or NUMBER type, the minimum value permitted */
219
+ min_value?: number;
220
+ /** if the option is an INTEGER or NUMBER type, the maximum value permitted */
221
+ max_value?: number;
222
+ /** if autocomplete interactions are enabled for this STRING, INTEGER, or NUMBER type option */
223
+ autocomplete?: boolean;
224
+ }
225
+ export interface ApplicationCommandOptionChoice {
226
+ /** 1-100 character choice name */
227
+ name: string;
228
+ /** value of the choice, up to 100 characters if string */
229
+ value: string;
230
+ }
231
+ export declare enum ApplicationCommandOptionType {
232
+ SUB_COMMAND = 1,
233
+ SUB_COMMAND_GROUP = 2,
234
+ STRING = 3,
235
+ INTEGER = 4,
236
+ BOOLEAN = 5,
237
+ USER = 6,
238
+ CHANNEL = 7,
239
+ ROLE = 8,
240
+ MENTIONABLE = 9,
241
+ NUMBER = 10,
242
+ ATTACHMENT = 11
243
+ }
244
+ export interface ApplicationCommandPermission {
245
+ /** the id of the role or user */
246
+ id: Snowflake;
247
+ /** role or user */
248
+ type: ApplicationCommandPermissionType;
249
+ /** true to allow, false, to disallow */
250
+ permission: boolean;
251
+ }
252
+ export declare enum ApplicationCommandPermissionType {
253
+ ROLE = 1,
254
+ USER = 2
255
+ }
256
+ export declare enum ApplicationCommandType {
257
+ /** Slash commands; a text-based command that shows up when a user types / */
258
+ CHAT_INPUT = 1,
259
+ /** A UI-based command that shows up when you right click or tap on a user */
260
+ USER = 2,
261
+ /** A UI-based command that shows up when you right click or tap on a message */
262
+ MESSAGE = 3
263
+ }
264
+ export declare const ApplicationFlag: {
265
+ /** Intent required for bots in 100 or more servers to receive presence_update events */
266
+ readonly GATEWAY_PRESENCE: number;
267
+ /** Intent required for bots in under 100 servers to receive presence_update events, found in Bot Settings */
268
+ readonly GATEWAY_PRESENCE_LIMITED: number;
269
+ /** Intent required for bots in 100 or more servers to receive member-related events like guild_member_add. See list of member-related events under GUILD_MEMBERS */
270
+ readonly GATEWAY_GUILD_MEMBERS: number;
271
+ /** Intent required for bots in under 100 servers to receive member-related events like guild_member_add, found in Bot Settings. See list of member-related events under GUILD_MEMBERS */
272
+ readonly GATEWAY_GUILD_MEMBERS_LIMITED: number;
273
+ /** Indicates unusual growth of an app that prevents verification */
274
+ readonly VERIFICATION_PENDING_GUILD_LIMIT: number;
275
+ /** Indicates if an app is embedded within the Discord client (currently unavailable publicly) */
276
+ readonly EMBEDDED: number;
277
+ /** Intent required for bots in 100 or more servers to receive message content */
278
+ readonly GATEWAY_MESSAGE_CONTENT: number;
279
+ /** Intent required for bots in under 100 servers to receive message content, found in Bot Settings */
280
+ readonly GATEWAY_MESSAGE_CONTENT_LIMITED: number;
281
+ };
282
+ export interface Attachment {
283
+ /** attachment id */
284
+ id: Snowflake;
285
+ /** name of file attached */
286
+ filename: string;
287
+ /** description for the file */
288
+ description?: string;
289
+ /** the attachment's media type */
290
+ content_type?: string;
291
+ /** size of file in bytes */
292
+ size: number;
293
+ /** source url of file */
294
+ url: string;
295
+ /** a proxied url of file */
296
+ proxy_url: string;
297
+ /** height of file (if image) */
298
+ height?: number | null;
299
+ /** width of file (if image) */
300
+ width?: number | null;
301
+ /** whether this attachment is ephemeral */
302
+ ephemeral?: boolean;
303
+ }
304
+ export interface AuditEntryInfo {
305
+ /** channel in which the entities were targeted */
306
+ channel_id: Snowflake;
307
+ /** number of entities that were targeted */
308
+ count: string;
309
+ /** number of days after which inactive members were kicked */
310
+ delete_member_days: string;
311
+ /** id of the overwritten entity */
312
+ id: Snowflake;
313
+ /** number of members removed by the prune */
314
+ members_removed: string;
315
+ /** id of the message that was targeted */
316
+ message_id: Snowflake;
317
+ /** name of the role if type is "0" (not present if type is "1") */
318
+ role_name: string;
319
+ /** type of overwritten entity - "0" for "role" or "1" for "member" */
320
+ type: string;
321
+ }
322
+ export interface AuditLog {
323
+ /** list of audit log entries */
324
+ audit_log_entries: AuditLogEntry[];
325
+ /** list of guild scheduled events found in the audit log */
326
+ guild_scheduled_events: GuildScheduledEvent[];
327
+ /** list of partial integration objects */
328
+ integrations: Integration[];
329
+ /** list of threads found in the audit log* */
330
+ threads: Channel[];
331
+ /** list of users found in the audit log */
332
+ users: User[];
333
+ /** list of webhooks found in the audit log */
334
+ webhooks: Webhook[];
335
+ }
336
+ export interface AuditLogChange {
337
+ /** new value of the key */
338
+ new_value?: any;
339
+ /** old value of the key */
340
+ old_value?: any;
341
+ /** name of audit log change key */
342
+ key: string;
343
+ }
344
+ export interface AuditLogEntry {
345
+ /** id of the affected entity (webhook, user, role, etc.) */
346
+ target_id?: string | null;
347
+ /** changes made to the target_id */
348
+ changes?: AuditLogChange[];
349
+ /** the user who made the changes */
350
+ user_id?: Snowflake | null;
351
+ /** id of the entry */
352
+ id: Snowflake;
353
+ /** type of action that occurred */
354
+ action_type: AuditLogEvent;
355
+ /** additional info for certain action types */
356
+ options?: AuditEntryInfo;
357
+ /** the reason for the change (0-512 characters) */
358
+ reason?: string;
359
+ }
360
+ export declare enum AuditLogEvent {
361
+ GUILD_UPDATE = 1,
362
+ CHANNEL_CREATE = 10,
363
+ CHANNEL_UPDATE = 11,
364
+ CHANNEL_DELETE = 12,
365
+ CHANNEL_OVERWRITE_CREATE = 13,
366
+ CHANNEL_OVERWRITE_UPDATE = 14,
367
+ CHANNEL_OVERWRITE_DELETE = 15,
368
+ MEMBER_KICK = 20,
369
+ MEMBER_PRUNE = 21,
370
+ MEMBER_BAN_ADD = 22,
371
+ MEMBER_BAN_REMOVE = 23,
372
+ MEMBER_UPDATE = 24,
373
+ MEMBER_ROLE_UPDATE = 25,
374
+ MEMBER_MOVE = 26,
375
+ MEMBER_DISCONNECT = 27,
376
+ BOT_ADD = 28,
377
+ ROLE_CREATE = 30,
378
+ ROLE_UPDATE = 31,
379
+ ROLE_DELETE = 32,
380
+ INVITE_CREATE = 40,
381
+ INVITE_UPDATE = 41,
382
+ INVITE_DELETE = 42,
383
+ WEBHOOK_CREATE = 50,
384
+ WEBHOOK_UPDATE = 51,
385
+ WEBHOOK_DELETE = 52,
386
+ EMOJI_CREATE = 60,
387
+ EMOJI_UPDATE = 61,
388
+ EMOJI_DELETE = 62,
389
+ MESSAGE_DELETE = 72,
390
+ MESSAGE_BULK_DELETE = 73,
391
+ MESSAGE_PIN = 74,
392
+ MESSAGE_UNPIN = 75,
393
+ INTEGRATION_CREATE = 80,
394
+ INTEGRATION_UPDATE = 81,
395
+ INTEGRATION_DELETE = 82,
396
+ STAGE_INSTANCE_CREATE = 83,
397
+ STAGE_INSTANCE_UPDATE = 84,
398
+ STAGE_INSTANCE_DELETE = 85,
399
+ STICKER_CREATE = 90,
400
+ STICKER_UPDATE = 91,
401
+ STICKER_DELETE = 92,
402
+ GUILD_SCHEDULED_EVENT_CREATE = 100,
403
+ GUILD_SCHEDULED_EVENT_UPDATE = 101,
404
+ GUILD_SCHEDULED_EVENT_DELETE = 102,
405
+ THREAD_CREATE = 110,
406
+ THREAD_UPDATE = 111,
407
+ THREAD_DELETE = 112
408
+ }
409
+ export interface Ban {
410
+ /** the reason for the ban */
411
+ reason?: string | null;
412
+ /** the banned user */
413
+ user: User;
414
+ }
415
+ export interface BeginGuildPruneParams {
416
+ /** number of days to prune (1-30) */
417
+ days: number;
418
+ /** whether 'pruned' is returned, discouraged for large guilds */
419
+ compute_prune_count: boolean;
420
+ /** role(s) to include */
421
+ include_roles: Snowflake[];
422
+ /** reason for the prune (deprecated) */
423
+ reason?: string;
424
+ }
425
+ export interface BulkDeleteMessageParams {
426
+ /** an array of message ids to delete (2-100) */
427
+ messages: Snowflake[];
428
+ }
429
+ export interface BulkOverwriteGuildApplicationCommandParams {
430
+ /** application command id, if known */
431
+ id: Snowflake;
432
+ /** 1-32 character name */
433
+ name: string;
434
+ /** 1-100 character description */
435
+ description: string;
436
+ /** the parameters for the command */
437
+ options?: ApplicationCommandOption[];
438
+ /** whether the command is enabled by default when the app is added to a guild */
439
+ default_permission?: boolean;
440
+ /** the type of command, defaults 1 if not set */
441
+ type?: ApplicationCommandType;
442
+ }
443
+ export interface Button {
444
+ /** 2 for a button */
445
+ type: number;
446
+ /** one of button styles */
447
+ style: ButtonStyle;
448
+ /** text that appears on the button, max 80 characters */
449
+ label?: string;
450
+ /** name, id, and animated */
451
+ emoji?: Emoji;
452
+ /** a developer-defined identifier for the button, max 100 characters */
453
+ custom_id?: string;
454
+ /** a url for link-style buttons */
455
+ url?: string;
456
+ /** whether the button is disabled (default false) */
457
+ disabled?: boolean;
458
+ }
459
+ export declare enum ButtonStyle {
460
+ PRIMARY = 1,
461
+ SECONDARY = 2,
462
+ SUCCESS = 3,
463
+ DANGER = 4,
464
+ LINK = 5
465
+ }
466
+ export interface Channel {
467
+ /** the id of this channel */
468
+ id: Snowflake;
469
+ /** the type of channel */
470
+ type: ChannelType;
471
+ /** the id of the guild (may be missing for some channel objects received over gateway guild dispatches) */
472
+ guild_id?: Snowflake;
473
+ /** sorting position of the channel */
474
+ position?: number;
475
+ /** explicit permission overwrites for members and roles */
476
+ permission_overwrites?: Overwrite[];
477
+ /** the name of the channel (1-100 characters) */
478
+ name?: string;
479
+ /** the channel topic (0-1024 characters) */
480
+ topic?: string | null;
481
+ /** whether the channel is nsfw */
482
+ nsfw?: boolean;
483
+ /** the id of the last message sent in this channel (may not point to an existing or valid message) */
484
+ last_message_id?: Snowflake | null;
485
+ /** the bitrate (in bits) of the voice channel */
486
+ bitrate?: number;
487
+ /** the user limit of the voice channel */
488
+ user_limit?: number;
489
+ /** 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 */
490
+ rate_limit_per_user?: number;
491
+ /** the recipients of the DM */
492
+ recipients?: User[];
493
+ /** icon hash of the group DM */
494
+ icon?: string | null;
495
+ /** id of the creator of the group DM or thread */
496
+ owner_id?: Snowflake;
497
+ /** application id of the group DM creator if it is bot-created */
498
+ application_id?: Snowflake;
499
+ /** for guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created */
500
+ parent_id?: Snowflake | null;
501
+ /** when the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */
502
+ last_pin_timestamp?: string | null;
503
+ /** voice region id for the voice channel, automatic when set to null */
504
+ rtc_region?: string | null;
505
+ /** the camera video quality mode of the voice channel, 1 when not present */
506
+ video_quality_mode?: VideoQualityMode;
507
+ /** an approximate count of messages in a thread, stops counting at 50 */
508
+ message_count?: number;
509
+ /** an approximate count of users in a thread, stops counting at 50 */
510
+ member_count?: number;
511
+ /** thread-specific fields not needed by other channels */
512
+ thread_metadata?: ThreadMetadatum;
513
+ /** thread member object for the current user, if they have joined the thread, only included on certain API endpoints */
514
+ member?: ThreadMember;
515
+ /** default duration that the clients (not the API) will use for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
516
+ default_auto_archive_duration?: number;
517
+ /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction */
518
+ permissions?: string;
519
+ }
520
+ export declare type ChannelCreateEvent = Channel;
521
+ export declare type ChannelDeleteEvent = Channel;
522
+ export interface ChannelMention {
523
+ /** id of the channel */
524
+ id: Snowflake;
525
+ /** id of the guild containing the channel */
526
+ guild_id: Snowflake;
527
+ /** the type of channel */
528
+ type: ChannelType;
529
+ /** the name of the channel */
530
+ name: string;
531
+ }
532
+ export interface ChannelPinsUpdateEvent {
533
+ /** the id of the guild */
534
+ guild_id?: Snowflake;
535
+ /** the id of the channel */
536
+ channel_id: Snowflake;
537
+ /** the time at which the most recent pinned message was pinned */
538
+ last_pin_timestamp?: string | null;
539
+ }
540
+ export declare enum ChannelType {
541
+ /** a text channel within a server */
542
+ GUILD_TEXT = 0,
543
+ /** a direct message between users */
544
+ DM = 1,
545
+ /** a voice channel within a server */
546
+ GUILD_VOICE = 2,
547
+ /** a direct message between multiple users */
548
+ GROUP_DM = 3,
549
+ /** an organizational category that contains up to 50 channels */
550
+ GUILD_CATEGORY = 4,
551
+ /** a channel that users can follow and crosspost into their own server */
552
+ GUILD_NEWS = 5,
553
+ /** a channel in which game developers can sell their game on Discord */
554
+ GUILD_STORE = 6,
555
+ /** a temporary sub-channel within a GUILD_NEWS channel */
556
+ GUILD_NEWS_THREAD = 10,
557
+ /** a temporary sub-channel within a GUILD_TEXT channel */
558
+ GUILD_PUBLIC_THREAD = 11,
559
+ /** a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission */
560
+ GUILD_PRIVATE_THREAD = 12,
561
+ /** a voice channel for hosting events with an audience */
562
+ GUILD_STAGE_VOICE = 13
563
+ }
564
+ export declare type ChannelUpdateEvent = Channel;
565
+ export interface ClientStatus {
566
+ /** the user's status set for an active desktop (Windows, Linux, Mac) application session */
567
+ desktop?: string;
568
+ /** the user's status set for an active mobile (iOS, Android) application session */
569
+ mobile?: string;
570
+ /** the user's status set for an active web (browser, bot account) application session */
571
+ web?: string;
572
+ }
573
+ export declare type Component = ActionRow | Button | TextInput | SelectMenu;
574
+ export declare enum ComponentType {
575
+ /** A container for other components */
576
+ ACTION_ROW = 1,
577
+ /** A button object */
578
+ BUTTON = 2,
579
+ /** A select menu for picking from choices */
580
+ SELECT_MENU = 3,
581
+ /** A text input object */
582
+ TEXT_INPUT = 4
583
+ }
584
+ export interface Connection {
585
+ /** id of the connection account */
586
+ id: string;
587
+ /** the username of the connection account */
588
+ name: string;
589
+ /** the service of the connection (twitch, youtube) */
590
+ type: string;
591
+ /** whether the connection is revoked */
592
+ revoked?: boolean;
593
+ /** an array of partial server integrations */
594
+ integrations?: Integration[];
595
+ /** whether the connection is verified */
596
+ verified: boolean;
597
+ /** whether friend sync is enabled for this connection */
598
+ friend_sync: boolean;
599
+ /** whether activities related to this connection will be shown in presence updates */
600
+ show_activity: boolean;
601
+ /** visibility of this connection */
602
+ visibility: VisibilityType;
603
+ }
604
+ export interface CreateChannelInviteParams {
605
+ /** duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days) */
606
+ max_age: number;
607
+ /** max number of uses or 0 for unlimited. between 0 and 100 */
608
+ max_uses: number;
609
+ /** whether this invite only grants temporary membership */
610
+ temporary: boolean;
611
+ /** if true, don't try to reuse a similar invite (useful for creating many unique one time use invites) */
612
+ unique: boolean;
613
+ /** the type of target for this voice channel invite */
614
+ target_type: InviteTargetType;
615
+ /** the id of the user whose stream to display for this invite, required if target_type is 1, the user must be streaming in the channel */
616
+ target_user_id: Snowflake;
617
+ /** the id of the embedded application to open for this invite, required if target_type is 2, the application must have the EMBEDDED flag */
618
+ target_application_id: Snowflake;
619
+ }
620
+ export interface CreateDmParams {
621
+ /** the recipient to open a DM channel with */
622
+ recipient_id: Snowflake;
623
+ }
624
+ export interface CreateGlobalApplicationCommandParams {
625
+ /** 1-32 character name */
626
+ name: string;
627
+ /** 1-100 character description */
628
+ description: string;
629
+ /** the parameters for the command */
630
+ options?: ApplicationCommandOption[];
631
+ /** whether the command is enabled by default when the app is added to a guild */
632
+ default_permission?: boolean;
633
+ /** the type of command, defaults 1 if not set */
634
+ type?: ApplicationCommandType;
635
+ }
636
+ export interface CreateGroupDmParams {
637
+ /** access tokens of users that have granted your app the gdm.join scope */
638
+ access_tokens: string[];
639
+ /** a dictionary of user ids to their respective nicknames */
640
+ nicks: Record<string, string>;
641
+ }
642
+ export interface CreateGuildApplicationCommandParams {
643
+ /** 1-32 character name */
644
+ name: string;
645
+ /** 1-100 character description */
646
+ description: string;
647
+ /** the parameters for the command */
648
+ options?: ApplicationCommandOption[];
649
+ /** whether the command is enabled by default when the app is added to a guild */
650
+ default_permission?: boolean;
651
+ /** the type of command, defaults 1 if not set */
652
+ type?: ApplicationCommandType;
653
+ }
654
+ export interface CreateGuildBanParams {
655
+ /** number of days to delete messages for (0-7) */
656
+ delete_message_days?: number;
657
+ /** reason for the ban (deprecated) */
658
+ reason?: string;
659
+ }
660
+ export interface CreateGuildChannelParams {
661
+ /** channel name (1-100 characters) */
662
+ name: string;
663
+ /** the type of channel */
664
+ type: ChannelType;
665
+ /** channel topic (0-1024 characters) */
666
+ topic: string;
667
+ /** the bitrate (in bits) of the voice channel (voice only) */
668
+ bitrate: number;
669
+ /** the user limit of the voice channel (voice only) */
670
+ user_limit: number;
671
+ /** 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 */
672
+ rate_limit_per_user: number;
673
+ /** sorting position of the channel */
674
+ position: number;
675
+ /** the channel's permission overwrites */
676
+ permission_overwrites: Overwrite[];
677
+ /** id of the parent category for a channel */
678
+ parent_id: Snowflake;
679
+ /** whether the channel is nsfw */
680
+ nsfw: boolean;
681
+ }
682
+ export interface CreateGuildEmojiParams {
683
+ /** name of the emoji */
684
+ name: string;
685
+ /** the 128x128 emoji image */
686
+ image: string;
687
+ /** roles allowed to use this emoji */
688
+ roles: Snowflake[];
689
+ }
690
+ export interface CreateGuildFromGuildTemplateParams {
691
+ /** name of the guild (2-100 characters) */
692
+ name: string;
693
+ /** base64 128x128 image for the guild icon */
694
+ icon?: string;
695
+ }
696
+ export interface CreateGuildParams {
697
+ /** name of the guild (2-100 characters) */
698
+ name: string;
699
+ /** voice region id (deprecated) */
700
+ region?: string | null;
701
+ /** base64 128x128 image for the guild icon */
702
+ icon?: string;
703
+ /** verification level */
704
+ verification_level?: VerificationLevel;
705
+ /** default message notification level */
706
+ default_message_notifications?: DefaultMessageNotificationLevel;
707
+ /** explicit content filter level */
708
+ explicit_content_filter?: ExplicitContentFilterLevel;
709
+ /** new guild roles */
710
+ roles?: Role[];
711
+ /** new guild's channels */
712
+ channels?: Channel[];
713
+ /** id for afk channel */
714
+ afk_channel_id?: Snowflake;
715
+ /** afk timeout in seconds */
716
+ afk_timeout?: number;
717
+ /** the id of the channel where guild notices such as welcome messages and boost events are posted */
718
+ system_channel_id?: Snowflake;
719
+ /** system channel flags */
720
+ system_channel_flags?: number;
721
+ }
722
+ export interface CreateGuildRoleParams {
723
+ /** name of the role */
724
+ name: string;
725
+ /** bitwise value of the enabled/disabled permissions */
726
+ permissions: string;
727
+ /** RGB color value */
728
+ color: number;
729
+ /** whether the role should be displayed separately in the sidebar */
730
+ hoist: boolean;
731
+ /** the role's icon image (if the guild has the ROLE_ICONS feature) */
732
+ icon?: string | null;
733
+ /** the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature) */
734
+ unicode_emoji?: string | null;
735
+ /** whether the role should be mentionable */
736
+ mentionable: boolean;
737
+ }
738
+ export interface CreateGuildScheduledEventParams {
739
+ /** the channel id of the scheduled event. */
740
+ channel_id?: Snowflake;
741
+ /** the entity metadata of the scheduled event */
742
+ entity_metadata?: GuildScheduledEventEntityMetadatum;
743
+ /** the name of the scheduled event */
744
+ name: string;
745
+ /** the privacy level of the scheduled event */
746
+ privacy_level: GuildScheduledEventPrivacyLevel;
747
+ /** the time to schedule the scheduled event */
748
+ scheduled_start_time: string;
749
+ /** the time when the scheduled event is scheduled to end */
750
+ scheduled_end_time?: string;
751
+ /** the description of the scheduled event */
752
+ description?: string;
753
+ /** the entity type of the scheduled event */
754
+ entity_type: GuildScheduledEventEntityType;
755
+ /** the cover image of the scheduled event */
756
+ image?: string;
757
+ }
758
+ export interface CreateGuildStickerParams {
759
+ /** name of the sticker (2-30 characters) */
760
+ name: string;
761
+ /** description of the sticker (empty or 2-100 characters) */
762
+ description: string;
763
+ /** autocomplete/suggestion tags for the sticker (max 200 characters) */
764
+ tags: string;
765
+ /** the sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB */
766
+ file: string;
767
+ }
768
+ export interface CreateGuildTemplateParams {
769
+ /** name of the template (1-100 characters) */
770
+ name: string;
771
+ /** description for the template (0-120 characters) */
772
+ description?: string | null;
773
+ }
774
+ export interface CreateMessageParams {
775
+ /** the message contents (up to 2000 characters) */
776
+ content: string;
777
+ /** true if this is a TTS message */
778
+ tts: boolean;
779
+ /** embedded rich content (up to 6000 characters) */
780
+ embeds: Embed[];
781
+ /** embedded rich content, deprecated in favor of embeds */
782
+ embed: Embed;
783
+ /** allowed mentions for the message */
784
+ allowed_mentions: AllowedMention;
785
+ /** include to make your message a reply */
786
+ message_reference: MessageReference;
787
+ /** the components to include with the message */
788
+ components: Component[];
789
+ /** IDs of up to 3 stickers in the server to send in the message */
790
+ sticker_ids: Snowflake[];
791
+ /** the contents of the file being sent */
792
+ files: string;
793
+ /** JSON encoded body of non-file params */
794
+ payload_json: string;
795
+ /** attachment objects with filename and description */
796
+ attachments: Attachment[];
797
+ /** message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
798
+ flags: number;
799
+ }
800
+ export declare function createRoutes<O = any>(fetch: <R, P>(route: Route<P, O>) => Response<R>): Endpoints<O>;
801
+ export interface CreateStageInstanceParams {
802
+ /** The id of the Stage channel */
803
+ channel_id: Snowflake;
804
+ /** The topic of the Stage instance (1-120 characters) */
805
+ topic: string;
806
+ /** The privacy level of the Stage instance (default GUILD_ONLY) */
807
+ privacy_level?: PrivacyLevel;
808
+ }
809
+ export interface CreateWebhookParams {
810
+ /** name of the webhook (1-80 characters) */
811
+ name: string;
812
+ /** image for the default webhook avatar */
813
+ avatar?: string | null;
814
+ }
815
+ export declare enum DefaultMessageNotificationLevel {
816
+ /** members will receive notifications for all messages by default */
817
+ ALL_MESSAGES = 0,
818
+ /** members will receive notifications only for messages that @mention them by default */
819
+ ONLY_MENTIONS = 1
820
+ }
821
+ export interface DeleteWebhookMessageParams {
822
+ /** id of the thread the message is in */
823
+ thread_id: Snowflake;
824
+ }
825
+ export interface EditApplicationCommandPermissionParams {
826
+ /** the permissions for the command in the guild */
827
+ permissions: ApplicationCommandPermission[];
828
+ }
829
+ export interface EditChannelPermissionParams {
830
+ /** the bitwise value of all allowed permissions (default "0") */
831
+ allow?: string;
832
+ /** the bitwise value of all disallowed permissions (default "0") */
833
+ deny?: string;
834
+ /** 0 for a role or 1 for a member */
835
+ type: number;
836
+ }
837
+ export interface EditGlobalApplicationCommandParams {
838
+ /** 1-32 character name */
839
+ name?: string;
840
+ /** 1-100 character description */
841
+ description?: string;
842
+ /** the parameters for the command */
843
+ options?: ApplicationCommandOption[];
844
+ /** whether the command is enabled by default when the app is added to a guild */
845
+ default_permission?: boolean;
846
+ }
847
+ export interface EditGuildApplicationCommandParams {
848
+ /** 1-32 character name */
849
+ name?: string;
850
+ /** 1-100 character description */
851
+ description?: string;
852
+ /** the parameters for the command */
853
+ options?: ApplicationCommandOption[];
854
+ /** whether the command is enabled by default when the app is added to a guild */
855
+ default_permission?: boolean;
856
+ }
857
+ export interface EditMessageParams {
858
+ /** the message contents (up to 2000 characters) */
859
+ content: string;
860
+ /** embedded rich content (up to 6000 characters) */
861
+ embeds: Embed[];
862
+ /** embedded rich content, deprecated in favor of embeds */
863
+ embed: Embed;
864
+ /** edit the flags of a message (only SUPPRESS_EMBEDS can currently be set/unset) */
865
+ flags: number;
866
+ /** allowed mentions for the message */
867
+ allowed_mentions: AllowedMention;
868
+ /** the components to include with the message */
869
+ components: Component[];
870
+ /** the contents of the file being sent/edited */
871
+ files: string;
872
+ /** JSON encoded body of non-file params (multipart/form-data only) */
873
+ payload_json: string;
874
+ /** attached files to keep and possible descriptions for new files */
875
+ attachments: Attachment[];
876
+ }
877
+ export interface EditWebhookMessageParams {
878
+ /** the message contents (up to 2000 characters) */
879
+ content: string;
880
+ /** embedded rich content */
881
+ embeds: Embed[];
882
+ /** allowed mentions for the message */
883
+ allowed_mentions: AllowedMention;
884
+ /** the components to include with the message */
885
+ components: Component[];
886
+ /** the contents of the file being sent/edited */
887
+ files: string;
888
+ /** JSON encoded body of non-file params (multipart/form-data only) */
889
+ payload_json: string;
890
+ /** attached files to keep and possible descriptions for new files */
891
+ attachments: Attachment[];
892
+ }
893
+ export interface Embed {
894
+ /** title of embed */
895
+ title?: string;
896
+ /** type of embed (always "rich" for webhook embeds) */
897
+ type?: EmbedType;
898
+ /** description of embed */
899
+ description?: string;
900
+ /** url of embed */
901
+ url?: string;
902
+ /** timestamp of embed content */
903
+ timestamp?: string;
904
+ /** color code of the embed */
905
+ color?: number;
906
+ /** footer information */
907
+ footer?: EmbedFooter;
908
+ /** image information */
909
+ image?: EmbedImage;
910
+ /** thumbnail information */
911
+ thumbnail?: EmbedThumbnail;
912
+ /** video information */
913
+ video?: EmbedVideo;
914
+ /** provider information */
915
+ provider?: EmbedProvider;
916
+ /** author information */
917
+ author?: EmbedAuthor;
918
+ /** fields information */
919
+ fields?: EmbedField[];
920
+ }
921
+ export interface EmbedAuthor {
922
+ /** name of author */
923
+ name: string;
924
+ /** url of author */
925
+ url?: string;
926
+ /** url of author icon (only supports http(s) and attachments) */
927
+ icon_url?: string;
928
+ /** a proxied url of author icon */
929
+ proxy_icon_url?: string;
930
+ }
931
+ export interface EmbedField {
932
+ /** name of the field */
933
+ name: string;
934
+ /** value of the field */
935
+ value: string;
936
+ /** whether or not this field should display inline */
937
+ inline?: boolean;
938
+ }
939
+ export interface EmbedFooter {
940
+ /** footer text */
941
+ text: string;
942
+ /** url of footer icon (only supports http(s) and attachments) */
943
+ icon_url?: string;
944
+ /** a proxied url of footer icon */
945
+ proxy_icon_url?: string;
946
+ }
947
+ export interface EmbedImage {
948
+ /** source url of image (only supports http(s) and attachments) */
949
+ url: string;
950
+ /** a proxied url of the image */
951
+ proxy_url?: string;
952
+ /** height of image */
953
+ height?: number;
954
+ /** width of image */
955
+ width?: number;
956
+ }
957
+ export interface EmbedProvider {
958
+ /** name of provider */
959
+ name?: string;
960
+ /** url of provider */
961
+ url?: string;
962
+ }
963
+ export interface EmbedThumbnail {
964
+ /** source url of thumbnail (only supports http(s) and attachments) */
965
+ url: string;
966
+ /** a proxied url of the thumbnail */
967
+ proxy_url?: string;
968
+ /** height of thumbnail */
969
+ height?: number;
970
+ /** width of thumbnail */
971
+ width?: number;
972
+ }
973
+ export declare enum EmbedType {
974
+ /** generic embed rendered from embed attributes */
975
+ RICH = "rich",
976
+ /** image embed */
977
+ IMAGE = "image",
978
+ /** video embed */
979
+ VIDEO = "video",
980
+ /** animated gif image embed rendered as a video embed */
981
+ GIFV = "gifv",
982
+ /** article embed */
983
+ ARTICLE = "article",
984
+ /** link embed */
985
+ LINK = "link"
986
+ }
987
+ export interface EmbedVideo {
988
+ /** source url of video */
989
+ url?: string;
990
+ /** a proxied url of the video */
991
+ proxy_url?: string;
992
+ /** height of video */
993
+ height?: number;
994
+ /** width of video */
995
+ width?: number;
996
+ }
997
+ export interface Emoji {
998
+ /** emoji id */
999
+ id?: Snowflake | null;
1000
+ /** emoji name */
1001
+ name?: string | null;
1002
+ /** roles allowed to use this emoji */
1003
+ roles?: Snowflake[];
1004
+ /** user that created this emoji */
1005
+ user?: User;
1006
+ /** whether this emoji must be wrapped in colons */
1007
+ require_colons?: boolean;
1008
+ /** whether this emoji is managed */
1009
+ managed?: boolean;
1010
+ /** whether this emoji is animated */
1011
+ animated?: boolean;
1012
+ /** whether this emoji can be used, may be false due to loss of Server Boosts */
1013
+ available?: boolean;
1014
+ }
1015
+ export interface Endpoints<O> {
1016
+ /** 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 as the body, or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add Gateway event. */
1017
+ addGuildMember: (guildId: string, userId: string, params?: Partial<AddGuildMemberParams>, options?: O) => Response<GuildMember>;
1018
+ /** Adds a role to a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
1019
+ addGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: O) => Response<any>;
1020
+ /** Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event. */
1021
+ addThreadMember: (channelId: string, userId: string, options?: O) => Response<any>;
1022
+ batchEditApplicationCommandPermissions: (applicationId: string, guildId: string, params?: Partial<GuildApplicationCommandPermission[]>, options?: O) => Response<GuildApplicationCommandPermission[]>;
1023
+ /** 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 Gateway events. */
1024
+ beginGuildPrune: (guildId: string, params?: Partial<BeginGuildPruneParams>, options?: O) => Response<any>;
1025
+ /** Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Bulk Gateway event. */
1026
+ bulkDeleteMessages: (channelId: string, params?: Partial<BulkDeleteMessageParams>, options?: O) => Response<any>;
1027
+ /** Takes a list of application commands, overwriting the existing global command list for this application. Updates will be available in all guilds after 1 hour. Returns 200 and a list of application command objects. Commands that do not already exist will count toward daily application command create limits. */
1028
+ bulkOverwriteGlobalApplicationCommands: (applicationId: string, options?: O) => Response<ApplicationCommand[]>;
1029
+ /** Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns 200 and a list of application command objects. */
1030
+ bulkOverwriteGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<BulkOverwriteGuildApplicationCommandParams>, options?: O) => Response<ApplicationCommand[]>;
1031
+ /** Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}). Returns an invite object. Fires an Invite Create Gateway event. */
1032
+ createChannelInvite: (channelId: string, params?: Partial<CreateChannelInviteParams>, options?: O) => Response<Invite>;
1033
+ /** Create a new DM channel with a user. Returns a DM channel object. */
1034
+ createDm: (params?: Partial<CreateDmParams>, options?: O) => Response<Channel>;
1035
+ /** Create a followup message for an Interaction. Functions the same as Execute Webhook, but wait is always true, and flags can be set to 64 in the body to send an ephemeral message. The thread_id, avatar_url, and username parameters are not supported when using this endpoint for interaction followups. */
1036
+ createFollowupMessage: (applicationId: string, interactionToken: string, options?: O) => Response<any>;
1037
+ createGlobalApplicationCommand: (applicationId: string, params?: Partial<CreateGlobalApplicationCommandParams>, options?: O) => Response<ApplicationCommand>;
1038
+ /** Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client */
1039
+ createGroupDm: (params?: Partial<CreateGroupDmParams>, options?: O) => Response<Channel>;
1040
+ /** Create a new guild. Returns a guild object on success. Fires a Guild Create Gateway event. */
1041
+ createGuild: (params?: Partial<CreateGuildParams>, options?: O) => Response<Guild>;
1042
+ createGuildApplicationCommand: (applicationId: string, guildId: string, params?: Partial<CreateGuildApplicationCommandParams>, options?: O) => Response<ApplicationCommand>;
1043
+ /** 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 Gateway event. */
1044
+ createGuildBan: (guildId: string, userId: string, params?: Partial<CreateGuildBanParams>, options?: O) => Response<any>;
1045
+ /** Create a new channel 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 object on success. Fires a Channel Create Gateway event. */
1046
+ createGuildChannel: (guildId: string, params?: Partial<CreateGuildChannelParams>, options?: O) => Response<Channel>;
1047
+ /** Create a new emoji for the guild. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event. */
1048
+ createGuildEmoji: (guildId: string, params?: Partial<CreateGuildEmojiParams>, options?: O) => Response<Emoji>;
1049
+ /** Create a new guild based on a template. Returns a guild object on success. Fires a Guild Create Gateway event. */
1050
+ createGuildFromGuildTemplate: (templateCode: string, params?: Partial<CreateGuildFromGuildTemplateParams>, options?: O) => Response<Guild>;
1051
+ /** Create a new role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional. */
1052
+ createGuildRole: (guildId: string, params?: Partial<CreateGuildRoleParams>, options?: O) => Response<Role>;
1053
+ /** Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. */
1054
+ createGuildScheduledEvent: (guildId: string, params?: Partial<CreateGuildScheduledEventParams>, options?: O) => Response<GuildScheduledEvent>;
1055
+ /** Create a new sticker for the guild. Send a multipart/form-data body. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new sticker object on success. */
1056
+ createGuildSticker: (guildId: string, params?: Partial<CreateGuildStickerParams>, options?: O) => Response<Sticker>;
1057
+ /** Creates a template for the guild. Requires the MANAGE_GUILD permission. Returns the created guild template object on success. */
1058
+ createGuildTemplate: (guildId: string, params?: Partial<CreateGuildTemplateParams>, options?: O) => Response<GuildTemplate>;
1059
+ /** Create a response to an Interaction from the gateway. Body is an interaction response. Returns 204 No Content. */
1060
+ createInteractionResponse: (interactionId: string, interactionToken: string, params?: Partial<InteractionResponse>, options?: O) => Response<any>;
1061
+ createMessage: (channelId: string, params?: Partial<CreateMessageParams>, options?: O) => Response<Message>;
1062
+ /** Create a reaction for the message. This endpoint requires the 'READ_MESSAGE_HISTORY' permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the 'ADD_REACTIONS' permission to be present on the current user. Returns a 204 empty response on success.
1063
+ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
1064
+ createReaction: (channelId: string, messageId: string, emoji: string, options?: O) => Response<any>;
1065
+ /** Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. */
1066
+ createStageInstance: (params?: Partial<CreateStageInstanceParams>, options?: O) => Response<StageInstance>;
1067
+ /** Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. */
1068
+ createWebhook: (channelId: string, params?: Partial<CreateWebhookParams>, options?: O) => Response<Webhook>;
1069
+ /** Crosspost a message in a News Channel to following channels. This endpoint requires the 'SEND_MESSAGES' permission, if the current user sent the message, or additionally the 'MANAGE_MESSAGES' permission, for all other messages, to be present for the current user. */
1070
+ crosspostMessage: (channelId: string, messageId: string, options?: O) => Response<Message>;
1071
+ /** Deletes all reactions on a message. This endpoint requires the 'MANAGE_MESSAGES' permission to be present on the current user. Fires a Message Reaction Remove All Gateway event. */
1072
+ deleteAllReactions: (channelId: string, messageId: string, options?: O) => Response<any>;
1073
+ /** Deletes all the reactions for a given emoji on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove Emoji Gateway event.
1074
+ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
1075
+ deleteAllReactionsForEmoji: (channelId: string, messageId: string, emoji: string, options?: O) => Response<any>;
1076
+ /** Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. For more information about permissions, see permissions */
1077
+ deleteChannelPermission: (channelId: string, overwriteId: string, options?: O) => Response<any>;
1078
+ /** Delete a channel, or close a private message. Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread). */
1079
+ deletecloseChannel: (channelId: string, options?: O) => Response<Channel>;
1080
+ /** Deletes a followup message for an Interaction. Returns 204 No Content on success. Does not support ephemeral followups. */
1081
+ deleteFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => Response<any>;
1082
+ /** Deletes a global command. Returns 204 No Content on success. */
1083
+ deleteGlobalApplicationCommand: (applicationId: string, commandId: string, options?: O) => Response<any>;
1084
+ /** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event. */
1085
+ deleteGuild: (guildId: string, options?: O) => Response<any>;
1086
+ /** Delete a guild command. Returns 204 No Content on success. */
1087
+ deleteGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: O) => Response<any>;
1088
+ /** Delete the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. Fires a Guild Emojis Update Gateway event. */
1089
+ deleteGuildEmoji: (guildId: string, emojiId: string, options?: O) => Response<any>;
1090
+ /** Delete the attached integration 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 Gateway event. */
1091
+ deleteGuildIntegration: (guildId: string, integrationId: string, options?: O) => Response<any>;
1092
+ /** Delete a guild role. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event. */
1093
+ deleteGuildRole: (guildId: string, roleId: string, options?: O) => Response<any>;
1094
+ /** Delete a guild scheduled event. Returns a 204 on success. */
1095
+ deleteGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, options?: O) => Response<any>;
1096
+ /** Delete the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. */
1097
+ deleteGuildSticker: (guildId: string, stickerId: string, options?: O) => Response<any>;
1098
+ /** Deletes the template. Requires the MANAGE_GUILD permission. Returns the deleted guild template object on success. */
1099
+ deleteGuildTemplate: (guildId: string, templateCode: string, options?: O) => Response<GuildTemplate>;
1100
+ /** 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 object on success. Fires a Invite Delete Gateway event. */
1101
+ deleteInvite: (inviteCode: string, options?: O) => Response<Invite>;
1102
+ /** Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Gateway event. */
1103
+ deleteMessage: (channelId: string, messageId: string, options?: O) => Response<any>;
1104
+ /** Deletes the initial Interaction response. Returns 204 No Content on success. Does not support ephemeral followups. */
1105
+ deleteOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => Response<any>;
1106
+ /** Delete a reaction the current user has made for the message. Returns a 204 empty response on success.
1107
+ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
1108
+ deleteOwnReaction: (channelId: string, messageId: string, emoji: string, options?: O) => Response<any>;
1109
+ /** Deletes the Stage instance. Returns 204 No Content. */
1110
+ deleteStageInstance: (channelId: string, options?: O) => Response<any>;
1111
+ /** Deletes another user's reaction. This endpoint requires the 'MANAGE_MESSAGES' permission to be present on the current user. Returns a 204 empty response on success.
1112
+ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
1113
+ deleteUserReaction: (channelId: string, messageId: string, emoji: string, userId: string, options?: O) => Response<any>;
1114
+ /** Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission. Returns a 204 No Content response on success. */
1115
+ deleteWebhook: (webhookId: string, options?: O) => Response<any>;
1116
+ /** Deletes a message that was created by the webhook. Returns a 204 No Content response on success. */
1117
+ deleteWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<DeleteWebhookMessageParams>, options?: O) => Response<any>;
1118
+ /** Same as above, except this call does not require authentication. */
1119
+ deleteWebhookWithToken: (webhookId: string, webhookToken: string, options?: O) => Response<any>;
1120
+ editApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, params?: Partial<EditApplicationCommandPermissionParams>, options?: O) => Response<GuildApplicationCommandPermission>;
1121
+ /** Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. For more information about permissions, see permissions. */
1122
+ editChannelPermissions: (channelId: string, overwriteId: string, params?: Partial<EditChannelPermissionParams>, options?: O) => Response<any>;
1123
+ /** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. */
1124
+ editFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => Response<any>;
1125
+ editGlobalApplicationCommand: (applicationId: string, commandId: string, params?: Partial<EditGlobalApplicationCommandParams>, options?: O) => Response<ApplicationCommand>;
1126
+ editGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, params?: Partial<EditGuildApplicationCommandParams>, options?: O) => Response<ApplicationCommand>;
1127
+ /** Edit a previously sent message. The fields content, embeds, and flags can be edited by the original message author. Other users can only edit flags and only if they have the MANAGE_MESSAGES permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags documented in the table below may be modified by users (unsupported flag changes are currently ignored without error). */
1128
+ editMessage: (channelId: string, messageId: string, params?: Partial<EditMessageParams>, options?: O) => Response<Message>;
1129
+ /** Edits the initial Interaction response. Functions the same as Edit Webhook Message. */
1130
+ editOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => Response<any>;
1131
+ /** Edits a previously-sent webhook message from the same token. Returns a message object on success. */
1132
+ editWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<EditWebhookMessageParams>, options?: O) => Response<Message>;
1133
+ /** Add a new webhook to your GitHub repo (in the repo's settings), and use this endpoint as the "Payload URL." You can choose what events your Discord channel receives by choosing the "Let me select individual events" option and selecting individual events for the new webhook you're configuring. */
1134
+ executeGitHubCompatibleWebhook: (webhookId: string, webhookToken: string, options?: O) => Response<any>;
1135
+ /** Refer to Slack's documentation for more information. We do not support Slack's channel, icon_emoji, mrkdwn, or mrkdwn_in properties. */
1136
+ executeSlackCompatibleWebhook: (webhookId: string, webhookToken: string, options?: O) => Response<any>;
1137
+ /** Refer to Uploading Files for details on attachments and multipart/form-data requests. Returns a message or 204 No Content depending on the wait query parameter. */
1138
+ executeWebhook: (webhookId: string, webhookToken: string, params?: Partial<ExecuteWebhookParams>, options?: O) => Response<any>;
1139
+ /** Follow a News Channel to send messages to a target channel. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a followed channel object. */
1140
+ followNewsChannel: (channelId: string, params?: Partial<FollowNewsChannelParams>, options?: O) => Response<FollowedChannel>;
1141
+ /** Fetches command permissions for a specific command for your application in a guild. Returns a guild application command permissions object. */
1142
+ getApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, options?: O) => Response<GuildApplicationCommandPermission>;
1143
+ /** Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result. */
1144
+ getChannel: (channelId: string, options?: O) => Response<Channel>;
1145
+ /** Returns a list of invite objects (with invite metadata) for the channel. Only usable for guild channels. Requires the MANAGE_CHANNELS permission. */
1146
+ getChannelInvites: (channelId: string, options?: O) => Response<Invite[]>;
1147
+ /** Returns a specific message in the channel. If operating on a guild channel, this endpoint requires the 'READ_MESSAGE_HISTORY' permission to be present on the current user. Returns a message object on success. */
1148
+ getChannelMessage: (channelId: string, messageId: string, options?: O) => Response<Message>;
1149
+ /** Returns the messages for a channel. If operating on a guild channel, this endpoint requires the VIEW_CHANNEL permission to be present on the current user. If the current user is missing the 'READ_MESSAGE_HISTORY' permission in the channel then this will return no messages (since they cannot read the message history). Returns an array of message objects on success. */
1150
+ getChannelMessages: (channelId: string, params?: Partial<GetChannelMessageParams>, options?: O) => Response<Message[]>;
1151
+ /** Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission. */
1152
+ getChannelWebhooks: (channelId: string, options?: O) => Response<Webhook[]>;
1153
+ /** Returns the user object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email. */
1154
+ getCurrentUser: (options?: O) => Response<User>;
1155
+ /** Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope. */
1156
+ getCurrentUserGuildMember: (guildId: string, options?: O) => Response<GuildMember>;
1157
+ /** Returns a list of partial guild objects the current user is a member of. Requires the guilds OAuth2 scope. */
1158
+ getCurrentUserGuilds: (params?: Partial<GetCurrentUserGuildParams>, options?: O) => Response<Guild[]>;
1159
+ /** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. */
1160
+ getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => Response<any>;
1161
+ getGateway: (options?: O) => Response<any>;
1162
+ getGatewayBot: (options?: O) => Response<GetGatewayBotResponse>;
1163
+ /** Fetch a global command for your application. Returns an application command object. */
1164
+ getGlobalApplicationCommand: (applicationId: string, commandId: string, options?: O) => Response<ApplicationCommand>;
1165
+ /** Fetch all of the global commands for your application. Returns an array of application command objects. */
1166
+ getGlobalApplicationCommands: (applicationId: string, options?: O) => Response<ApplicationCommand[]>;
1167
+ /** Returns the guild 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. */
1168
+ getGuild: (guildId: string, params?: Partial<GetGuildParams>, options?: O) => Response<Guild>;
1169
+ /** Fetch a guild command for your application. Returns an application command object. */
1170
+ getGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: O) => Response<ApplicationCommand>;
1171
+ /** Fetches command permissions for all commands for your application in a guild. Returns an array of guild application command permissions objects. */
1172
+ getGuildApplicationCommandPermissions: (applicationId: string, guildId: string, options?: O) => Response<GuildApplicationCommandPermission[]>;
1173
+ /** Fetch all of the guild commands for your application for a specific guild. Returns an array of application command objects. */
1174
+ getGuildApplicationCommands: (applicationId: string, guildId: string, options?: O) => Response<ApplicationCommand[]>;
1175
+ /** Returns an audit log object for the guild. Requires the 'VIEW_AUDIT_LOG' permission. */
1176
+ getGuildAuditLog: (guildId: string, params?: Partial<GetGuildAuditLogParams>, options?: O) => Response<AuditLog>;
1177
+ /** Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission. */
1178
+ getGuildBan: (guildId: string, userId: string, options?: O) => Response<Ban>;
1179
+ /** Returns a list of ban objects for the users banned from this guild. Requires the BAN_MEMBERS permission. */
1180
+ getGuildBans: (guildId: string, options?: O) => Response<Ban[]>;
1181
+ /** Returns a list of guild channel objects. Does not include threads. */
1182
+ getGuildChannels: (guildId: string, options?: O) => Response<Channel[]>;
1183
+ /** Returns an emoji object for the given guild and emoji IDs. */
1184
+ getGuildEmoji: (guildId: string, emojiId: string, options?: O) => Response<Emoji>;
1185
+ /** Returns a list of integration objects for the guild. Requires the MANAGE_GUILD permission. */
1186
+ getGuildIntegrations: (guildId: string, options?: O) => Response<Integration[]>;
1187
+ /** Returns a list of invite objects (with invite metadata) for the guild. Requires the MANAGE_GUILD permission. */
1188
+ getGuildInvites: (guildId: string, options?: O) => Response<Invite[]>;
1189
+ /** Returns a guild member object for the specified user. */
1190
+ getGuildMember: (guildId: string, userId: string, options?: O) => Response<GuildMember>;
1191
+ /** Returns the guild preview object for the given id. If the user is not in the guild, then the guild must be lurkable. */
1192
+ getGuildPreview: (guildId: string, options?: O) => Response<GuildPreview>;
1193
+ /** 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. */
1194
+ getGuildPruneCount: (guildId: string, params?: Partial<GetGuildPruneCountParams>, options?: O) => Response<any>;
1195
+ /** Returns a list of role objects for the guild. */
1196
+ getGuildRoles: (guildId: string, options?: O) => Response<Role[]>;
1197
+ /** Get a guild scheduled event. Returns a guild scheduled event object on success. */
1198
+ getGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventParams>, options?: O) => Response<GuildScheduledEvent>;
1199
+ /** Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the with_member query parameter is set. */
1200
+ getGuildScheduledEventUsers: (guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventUserParams>, options?: O) => Response<GuildScheduledEventUser[]>;
1201
+ /** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
1202
+ getGuildSticker: (guildId: string, stickerId: string, options?: O) => Response<Sticker>;
1203
+ /** Returns a guild template object for the given code. */
1204
+ getGuildTemplate: (templateCode: string, options?: O) => Response<GuildTemplate>;
1205
+ /** Returns an array of guild template objects. Requires the MANAGE_GUILD permission. */
1206
+ getGuildTemplates: (guildId: string, options?: O) => Response<GuildTemplate[]>;
1207
+ /** Returns a partial invite 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. */
1208
+ getGuildVanityUrl: (guildId: string, options?: O) => Response<Invite>;
1209
+ /** Returns a list of voice region objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled. */
1210
+ getGuildVoiceRegions: (guildId: string, options?: O) => Response<VoiceRegion[]>;
1211
+ /** Returns a list of guild webhook objects. Requires the MANAGE_WEBHOOKS permission. */
1212
+ getGuildWebhooks: (guildId: string, options?: O) => Response<Webhook[]>;
1213
+ /** Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the MANAGE_GUILD permission is required. */
1214
+ getGuildWelcomeScreen: (guildId: string, options?: O) => Response<WelcomeScreen>;
1215
+ /** Returns the widget for the guild. */
1216
+ getGuildWidget: (guildId: string, options?: O) => Response<GetGuildWidget>;
1217
+ /** Returns a PNG image widget for the guild. Requires no permissions or authentication. */
1218
+ getGuildWidgetImage: (guildId: string, params?: Partial<GetGuildWidgetImageParams>, options?: O) => Response<any>;
1219
+ /** Returns a guild widget settings object. Requires the MANAGE_GUILD permission. */
1220
+ getGuildWidgetSettings: (guildId: string, options?: O) => Response<GuildWidgetSetting>;
1221
+ /** Returns an invite object for the given code. */
1222
+ getInvite: (inviteCode: string, params?: Partial<GetInviteParams>, options?: O) => Response<Invite>;
1223
+ /** Returns the initial Interaction response. Functions the same as Get Webhook Message. */
1224
+ getOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => Response<any>;
1225
+ /** Returns all pinned messages in the channel as an array of message objects. */
1226
+ getPinnedMessages: (channelId: string, options?: O) => Response<Message[]>;
1227
+ /** Get a list of users that reacted with this emoji. Returns an array of user objects on success.
1228
+ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
1229
+ getReactions: (channelId: string, messageId: string, emoji: string, params?: Partial<GetReactionParams>, options?: O) => Response<User[]>;
1230
+ /** Gets the stage instance associated with the Stage channel, if it exists. */
1231
+ getStageInstance: (channelId: string, options?: O) => Response<any>;
1232
+ /** Returns a sticker object for the given sticker ID. */
1233
+ getSticker: (stickerId: string, options?: O) => Response<Sticker>;
1234
+ /** Returns a thread member object for the specified user if they are a member of the thread, returns a 404 response otherwise. */
1235
+ getThreadMember: (channelId: string, userId: string, options?: O) => Response<ThreadMember>;
1236
+ /** Returns a user object for a given user ID. */
1237
+ getUser: (userId: string, options?: O) => Response<User>;
1238
+ /** Returns a list of connection objects. Requires the connections OAuth2 scope. */
1239
+ getUserConnections: (options?: O) => Response<Connection[]>;
1240
+ /** Returns the new webhook object for the given id. */
1241
+ getWebhook: (webhookId: string, options?: O) => Response<Webhook>;
1242
+ /** Returns a previously-sent webhook message from the same token. Returns a message object on success. */
1243
+ getWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<GetWebhookMessageParams>, options?: O) => Response<Message>;
1244
+ /** Same as above, except this call does not require authentication and returns no user in the webhook object. */
1245
+ getWebhookWithToken: (webhookId: string, webhookToken: string, options?: O) => Response<any>;
1246
+ /** Adds a recipient to a Group DM using their access token. */
1247
+ groupDmAddRecipient: (channelId: string, userId: string, params?: Partial<GroupDmAddRecipientParams>, options?: O) => Response<any>;
1248
+ /** Removes a recipient from a Group DM. */
1249
+ groupDmRemoveRecipient: (channelId: string, userId: string, options?: O) => Response<any>;
1250
+ /** Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
1251
+ joinThread: (channelId: string, options?: O) => Response<any>;
1252
+ /** Leave a guild. Returns a 204 empty response on success. */
1253
+ leaveGuild: (guildId: string, options?: O) => Response<any>;
1254
+ /** Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
1255
+ leaveThread: (channelId: string, options?: O) => Response<any>;
1256
+ /** Returns all active threads in the channel, including public and private threads. Threads are ordered by their id, in descending order. */
1257
+ listActiveThreads: (channelId: string, options?: O) => Response<ListActiveThreadResponse>;
1258
+ /** Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order. */
1259
+ listGuildActiveThreads: (guildId: string, options?: O) => Response<ListGuildActiveThreadResponse>;
1260
+ /** Returns a list of emoji objects for the given guild. */
1261
+ listGuildEmojis: (guildId: string, options?: O) => Response<Emoji[]>;
1262
+ /** Returns a list of guild member objects that are members of the guild. */
1263
+ listGuildMembers: (guildId: string, params?: Partial<ListGuildMemberParams>, options?: O) => Response<GuildMember[]>;
1264
+ /** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
1265
+ listGuildStickers: (guildId: string, options?: O) => Response<Sticker[]>;
1266
+ /** Returns archived threads in the channel that are of type GUILD_PRIVATE_THREAD, and the user has joined. Threads are ordered by their id, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
1267
+ listJoinedPrivateArchivedThreads: (channelId: string, params?: Partial<ListJoinedPrivateArchivedThreadParams>, options?: O) => Response<ListJoinedPrivateArchivedThreadResponse>;
1268
+ /** Returns the list of sticker packs available to Nitro subscribers. */
1269
+ listNitroStickerPacks: (options?: O) => Response<any>;
1270
+ /** Returns archived threads in the channel that are of type GUILD_PRIVATE_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions. */
1271
+ listPrivateArchivedThreads: (channelId: string, params?: Partial<ListPrivateArchivedThreadParams>, options?: O) => Response<ListPrivateArchivedThreadResponse>;
1272
+ /** Returns archived threads in the channel that are public. When called on a GUILD_TEXT channel, returns threads of type GUILD_PUBLIC_THREAD. When called on a GUILD_NEWS channel returns threads of type GUILD_NEWS_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
1273
+ listPublicArchivedThreads: (channelId: string, params?: Partial<ListPublicArchivedThreadParams>, options?: O) => Response<ListPublicArchivedThreadResponse>;
1274
+ /** Returns a list of guild scheduled event objects for the given guild. */
1275
+ listScheduledEventsForGuild: (guildId: string, params?: Partial<ListScheduledEventsForGuildParams>, options?: O) => Response<GuildScheduledEvent[]>;
1276
+ /** Returns array of thread members objects that are members of the thread. */
1277
+ listThreadMembers: (channelId: string, options?: O) => Response<ThreadMember[]>;
1278
+ /** Returns an array of voice region objects that can be used when setting a voice or stage channel's rtc_region. */
1279
+ listVoiceRegions: (options?: O) => Response<VoiceRegion[]>;
1280
+ /** Update a channel's settings. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. All JSON parameters are optional. */
1281
+ modifyChannel: (channelId: string, params?: Partial<ModifyChannelParams>, options?: O) => Response<Channel>;
1282
+ /** Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event. */
1283
+ modifyCurrentMember: (guildId: string, params?: Partial<ModifyCurrentMemberParams>, options?: O) => Response<any>;
1284
+ /** Modify the requester's user account settings. Returns a user object on success. */
1285
+ modifyCurrentUser: (params?: Partial<ModifyCurrentUserParams>, options?: O) => Response<User>;
1286
+ modifyCurrentUserNick: (guildId: string, params?: Partial<ModifyCurrentUserNickParams>, options?: O) => Response<any>;
1287
+ /** Updates the current user's voice state. Returns 204 No Content on success. */
1288
+ modifyCurrentUserVoiceState: (guildId: string, params?: Partial<ModifyCurrentUserVoiceStateParams>, options?: O) => Response<any>;
1289
+ /** Modify a guild's settings. Requires the MANAGE_GUILD permission. Returns the updated guild object on success. Fires a Guild Update Gateway event. */
1290
+ modifyGuild: (guildId: string, params?: Partial<ModifyGuildParams>, options?: O) => Response<Guild>;
1291
+ /** Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events. */
1292
+ modifyGuildChannelPositions: (guildId: string, params?: Partial<ModifyGuildChannelPositionParams>, options?: O) => Response<any>;
1293
+ /** Modify the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */
1294
+ modifyGuildEmoji: (guildId: string, emojiId: string, params?: Partial<ModifyGuildEmojiParams>, options?: O) => Response<Emoji>;
1295
+ /** Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the channel_id is set to null, this will force the target user to be disconnected from voice. */
1296
+ modifyGuildMember: (guildId: string, userId: string, params?: Partial<ModifyGuildMemberParams>, options?: O) => Response<GuildMember>;
1297
+ /** Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event. */
1298
+ modifyGuildRole: (guildId: string, roleId: string, params?: Partial<ModifyGuildRoleParams>, options?: O) => Response<Role>;
1299
+ /** Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events. */
1300
+ modifyGuildRolePositions: (guildId: string, params?: Partial<ModifyGuildRolePositionParams>, options?: O) => Response<Role[]>;
1301
+ /** Modify a guild scheduled event. Returns the modified guild scheduled event object on success. */
1302
+ modifyGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<ModifyGuildScheduledEventParams>, options?: O) => Response<GuildScheduledEvent>;
1303
+ /** Modify the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated sticker object on success. */
1304
+ modifyGuildSticker: (guildId: string, stickerId: string, params?: Partial<ModifyGuildStickerParams>, options?: O) => Response<Sticker>;
1305
+ /** Modifies the template's metadata. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
1306
+ modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<ModifyGuildTemplateParams>, options?: O) => Response<GuildTemplate>;
1307
+ /** Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. */
1308
+ modifyGuildWelcomeScreen: (guildId: string, params?: Partial<ModifyGuildWelcomeScreenParams>, options?: O) => Response<WelcomeScreen>;
1309
+ /** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget object. */
1310
+ modifyGuildWidget: (guildId: string, options?: O) => Response<GuildWidgetSetting>;
1311
+ /** Updates fields of an existing Stage instance. Returns the updated Stage instance. */
1312
+ modifyStageInstance: (channelId: string, params?: Partial<ModifyStageInstanceParams>, options?: O) => Response<StageInstance>;
1313
+ /** Updates another user's voice state. */
1314
+ modifyUserVoiceState: (guildId: string, userId: string, params?: Partial<ModifyUserVoiceStateParams>, options?: O) => Response<any>;
1315
+ /** Modify a webhook. Requires the MANAGE_WEBHOOKS permission. Returns the updated webhook object on success. */
1316
+ modifyWebhook: (webhookId: string, params?: Partial<ModifyWebhookParams>, options?: O) => Response<Webhook>;
1317
+ /** Same as above, except this call does not require authentication, does not accept a channel_id parameter in the body, and does not return a user in the webhook object. */
1318
+ modifyWebhookWithToken: (webhookId: string, webhookToken: string, options?: O) => Response<any>;
1319
+ /** Pin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. */
1320
+ pinMessage: (channelId: string, messageId: string, options?: O) => Response<any>;
1321
+ /** Remove the ban for a user. Requires the BAN_MEMBERS permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event. */
1322
+ removeGuildBan: (guildId: string, userId: string, options?: O) => Response<any>;
1323
+ /** Remove a member from a guild. Requires KICK_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event. */
1324
+ removeGuildMember: (guildId: string, userId: string, options?: O) => Response<any>;
1325
+ /** Removes a role from a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
1326
+ removeGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: O) => Response<any>;
1327
+ /** Removes another member from a thread. Requires the MANAGE_THREADS permission, or the creator of the thread if it is a GUILD_PRIVATE_THREAD. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
1328
+ removeThreadMember: (channelId: string, userId: string, options?: O) => Response<any>;
1329
+ /** Returns a list of guild member objects whose username or nickname starts with a provided string. */
1330
+ searchGuildMembers: (guildId: string, params?: Partial<SearchGuildMemberParams>, options?: O) => Response<GuildMember[]>;
1331
+ /** Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
1332
+ startThreadWithMessage: (channelId: string, messageId: string, params?: Partial<StartThreadWithMessageParams>, options?: O) => Response<Channel>;
1333
+ /** Creates a new thread that is not connected to an existing message. The created thread defaults to a GUILD_PRIVATE_THREAD*. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
1334
+ startThreadWithoutMessage: (channelId: string, params?: Partial<StartThreadWithoutMessageParams>, options?: O) => Response<Channel>;
1335
+ /** Syncs the template to the guild's current state. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
1336
+ syncGuildTemplate: (guildId: string, templateCode: string, options?: O) => Response<GuildTemplate>;
1337
+ /** Post a typing indicator for the specified channel. Generally bots should not implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message. Returns a 204 empty response on success. Fires a Typing Start Gateway event. */
1338
+ triggerTypingIndicator: (channelId: string, options?: O) => Response<any>;
1339
+ /** Unpin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. */
1340
+ unpinMessage: (channelId: string, messageId: string, options?: O) => Response<any>;
1341
+ }
1342
+ export interface ExecuteWebhookParams {
1343
+ /** the message contents (up to 2000 characters) */
1344
+ content: string;
1345
+ /** override the default username of the webhook */
1346
+ username: string;
1347
+ /** override the default avatar of the webhook */
1348
+ avatar_url: string;
1349
+ /** true if this is a TTS message */
1350
+ tts: boolean;
1351
+ /** embedded rich content */
1352
+ embeds: Embed[];
1353
+ /** allowed mentions for the message */
1354
+ allowed_mentions: AllowedMention;
1355
+ /** the components to include with the message */
1356
+ components: Component[];
1357
+ /** the contents of the file being sent */
1358
+ files: string;
1359
+ /** JSON encoded body of non-file params */
1360
+ payload_json: string;
1361
+ /** attachment objects with filename and description */
1362
+ attachments: Attachment[];
1363
+ /** message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
1364
+ flags: number;
1365
+ }
1366
+ export declare enum ExplicitContentFilterLevel {
1367
+ /** media content will not be scanned */
1368
+ DISABLED = 0,
1369
+ /** media content sent by members without roles will be scanned */
1370
+ MEMBERS_WITHOUT_ROLES = 1,
1371
+ /** media content sent by all members will be scanned */
1372
+ ALL_MEMBERS = 2
1373
+ }
1374
+ export interface FollowedChannel {
1375
+ /** source channel id */
1376
+ channel_id: Snowflake;
1377
+ /** created target webhook id */
1378
+ webhook_id: Snowflake;
1379
+ }
1380
+ export interface FollowNewsChannelParams {
1381
+ /** id of target channel */
1382
+ webhook_channel_id: Snowflake;
1383
+ }
1384
+ export declare type GatewayCommand = Identify | Resume | Heartbeat | RequestGuildMember | UpdateVoiceState | UpdatePresence;
1385
+ export interface GatewayCommands {
1386
+ IDENTIFY: Identify;
1387
+ RESUME: Resume;
1388
+ HEARTBEAT: Heartbeat;
1389
+ REQUEST_GUILD_MEMBERS: RequestGuildMember;
1390
+ UPDATE_VOICE_STATE: UpdateVoiceState;
1391
+ UPDATE_PRESENCE: UpdatePresence;
1392
+ }
1393
+ export declare type GatewayEvent = HelloEvent | ReadyEvent | ResumedEvent | ReconnectEvent | InvalidSessionEvent | ChannelCreateEvent | ChannelUpdateEvent | ChannelDeleteEvent | ChannelPinsUpdateEvent | ThreadCreateEvent | ThreadUpdateEvent | ThreadDeleteEvent | ThreadListSyncEvent | ThreadMemberUpdateEvent | ThreadMembersUpdateEvent | GuildCreateEvent | GuildUpdateEvent | GuildDeleteEvent | GuildBanAddEvent | GuildBanRemoveEvent | GuildEmojisUpdateEvent | GuildStickersUpdateEvent | GuildIntegrationsUpdateEvent | GuildMemberAddEvent | GuildMemberRemoveEvent | GuildMemberUpdateEvent | GuildMembersChunkEvent | GuildRoleCreateEvent | GuildRoleUpdateEvent | GuildRoleDeleteEvent | GuildScheduledEventCreateEvent | GuildScheduledEventUpdateEvent | GuildScheduledEventDeleteEvent | GuildScheduledEventUserAddEvent | GuildScheduledEventUserRemoveEvent | IntegrationCreateEvent | IntegrationUpdateEvent | IntegrationDeleteEvent | InteractionCreateEvent | InviteCreateEvent | InviteDeleteEvent | MessageCreateEvent | MessageUpdateEvent | MessageDeleteEvent | MessageDeleteBulkEvent | MessageReactionAddEvent | MessageReactionRemoveEvent | MessageReactionRemoveAllEvent | MessageReactionRemoveEmojiEvent | PresenceUpdateEvent | StageInstanceCreateEvent | StageInstanceDeleteEvent | StageInstanceUpdateEvent | TypingStartEvent | UserUpdateEvent | VoiceStateUpdateEvent | VoiceServerUpdateEvent | WebhooksUpdateEvent;
1394
+ export interface GatewayEvents {
1395
+ HELLO: HelloEvent;
1396
+ READY: ReadyEvent;
1397
+ RESUMED: ResumedEvent;
1398
+ RECONNECT: ReconnectEvent;
1399
+ INVALID_SESSION: InvalidSessionEvent;
1400
+ CHANNEL_CREATE: ChannelCreateEvent;
1401
+ CHANNEL_UPDATE: ChannelUpdateEvent;
1402
+ CHANNEL_DELETE: ChannelDeleteEvent;
1403
+ CHANNEL_PINS_UPDATE: ChannelPinsUpdateEvent;
1404
+ THREAD_CREATE: ThreadCreateEvent;
1405
+ THREAD_UPDATE: ThreadUpdateEvent;
1406
+ THREAD_DELETE: ThreadDeleteEvent;
1407
+ THREAD_LIST_SYNC: ThreadListSyncEvent;
1408
+ THREAD_MEMBER_UPDATE: ThreadMemberUpdateEvent;
1409
+ THREAD_MEMBERS_UPDATE: ThreadMembersUpdateEvent;
1410
+ GUILD_CREATE: GuildCreateEvent;
1411
+ GUILD_UPDATE: GuildUpdateEvent;
1412
+ GUILD_DELETE: GuildDeleteEvent;
1413
+ GUILD_BAN_ADD: GuildBanAddEvent;
1414
+ GUILD_BAN_REMOVE: GuildBanRemoveEvent;
1415
+ GUILD_EMOJIS_UPDATE: GuildEmojisUpdateEvent;
1416
+ GUILD_STICKERS_UPDATE: GuildStickersUpdateEvent;
1417
+ GUILD_INTEGRATIONS_UPDATE: GuildIntegrationsUpdateEvent;
1418
+ GUILD_MEMBER_ADD: GuildMemberAddEvent;
1419
+ GUILD_MEMBER_REMOVE: GuildMemberRemoveEvent;
1420
+ GUILD_MEMBER_UPDATE: GuildMemberUpdateEvent;
1421
+ GUILD_MEMBERS_CHUNK: GuildMembersChunkEvent;
1422
+ GUILD_ROLE_CREATE: GuildRoleCreateEvent;
1423
+ GUILD_ROLE_UPDATE: GuildRoleUpdateEvent;
1424
+ GUILD_ROLE_DELETE: GuildRoleDeleteEvent;
1425
+ GUILD_SCHEDULED_EVENT_CREATE: GuildScheduledEventCreateEvent;
1426
+ GUILD_SCHEDULED_EVENT_UPDATE: GuildScheduledEventUpdateEvent;
1427
+ GUILD_SCHEDULED_EVENT_DELETE: GuildScheduledEventDeleteEvent;
1428
+ GUILD_SCHEDULED_EVENT_USER_ADD: GuildScheduledEventUserAddEvent;
1429
+ GUILD_SCHEDULED_EVENT_USER_REMOVE: GuildScheduledEventUserRemoveEvent;
1430
+ INTEGRATION_CREATE: IntegrationCreateEvent;
1431
+ INTEGRATION_UPDATE: IntegrationUpdateEvent;
1432
+ INTEGRATION_DELETE: IntegrationDeleteEvent;
1433
+ INTERACTION_CREATE: InteractionCreateEvent;
1434
+ INVITE_CREATE: InviteCreateEvent;
1435
+ INVITE_DELETE: InviteDeleteEvent;
1436
+ MESSAGE_CREATE: MessageCreateEvent;
1437
+ MESSAGE_UPDATE: MessageUpdateEvent;
1438
+ MESSAGE_DELETE: MessageDeleteEvent;
1439
+ MESSAGE_DELETE_BULK: MessageDeleteBulkEvent;
1440
+ MESSAGE_REACTION_ADD: MessageReactionAddEvent;
1441
+ MESSAGE_REACTION_REMOVE: MessageReactionRemoveEvent;
1442
+ MESSAGE_REACTION_REMOVE_ALL: MessageReactionRemoveAllEvent;
1443
+ MESSAGE_REACTION_REMOVE_EMOJI: MessageReactionRemoveEmojiEvent;
1444
+ PRESENCE_UPDATE: PresenceUpdateEvent;
1445
+ STAGE_INSTANCE_CREATE: StageInstanceCreateEvent;
1446
+ STAGE_INSTANCE_DELETE: StageInstanceDeleteEvent;
1447
+ STAGE_INSTANCE_UPDATE: StageInstanceUpdateEvent;
1448
+ TYPING_START: TypingStartEvent;
1449
+ USER_UPDATE: UserUpdateEvent;
1450
+ VOICE_STATE_UPDATE: VoiceStateUpdateEvent;
1451
+ VOICE_SERVER_UPDATE: VoiceServerUpdateEvent;
1452
+ WEBHOOKS_UPDATE: WebhooksUpdateEvent;
1453
+ }
1454
+ export declare const GatewayIntents: {
1455
+ readonly GUILDS: number;
1456
+ readonly GUILD_MEMBERS: number;
1457
+ readonly GUILD_BANS: number;
1458
+ readonly GUILD_EMOJIS_AND_STICKERS: number;
1459
+ readonly GUILD_INTEGRATIONS: number;
1460
+ readonly GUILD_WEBHOOKS: number;
1461
+ readonly GUILD_INVITES: number;
1462
+ readonly GUILD_VOICE_STATES: number;
1463
+ readonly GUILD_PRESENCES: number;
1464
+ readonly GUILD_MESSAGES: number;
1465
+ readonly GUILD_MESSAGE_REACTIONS: number;
1466
+ readonly GUILD_MESSAGE_TYPING: number;
1467
+ readonly DIRECT_MESSAGES: number;
1468
+ readonly DIRECT_MESSAGE_REACTIONS: number;
1469
+ readonly DIRECT_MESSAGE_TYPING: number;
1470
+ readonly GUILD_SCHEDULED_EVENTS: number;
1471
+ };
1472
+ export declare enum GatewayOpcode {
1473
+ /** An event was dispatched. */
1474
+ DISPATCH = 0,
1475
+ /** Fired periodically by the client to keep the connection alive. */
1476
+ HEARTBEAT = 1,
1477
+ /** Starts a new session during the initial handshake. */
1478
+ IDENTIFY = 2,
1479
+ /** Update the client's presence. */
1480
+ PRESENCE_UPDATE = 3,
1481
+ /** Used to join/leave or move between voice channels. */
1482
+ VOICE_STATE_UPDATE = 4,
1483
+ /** Resume a previous session that was disconnected. */
1484
+ RESUME = 6,
1485
+ /** You should attempt to reconnect and resume immediately. */
1486
+ RECONNECT = 7,
1487
+ /** Request information about offline guild members in a large guild. */
1488
+ REQUEST_GUILD_MEMBERS = 8,
1489
+ /** The session has been invalidated. You should reconnect and identify/resume accordingly. */
1490
+ INVALID_SESSION = 9,
1491
+ /** Sent immediately after connecting, contains the heartbeat_interval to use. */
1492
+ HELLO = 10,
1493
+ /** Sent in response to receiving a heartbeat to acknowledge that it has been received. */
1494
+ HEARTBEAT_ACK = 11
1495
+ }
1496
+ export interface GatewayPayload<T = any | null> {
1497
+ /** opcode for the payload */
1498
+ op: GatewayOpcode;
1499
+ /** event data */
1500
+ d?: T;
1501
+ /** sequence number, used for resuming sessions and heartbeats */
1502
+ s?: number | null;
1503
+ /** the event name for this payload */
1504
+ t?: string | null;
1505
+ }
1506
+ export interface GetChannelMessageParams {
1507
+ /** get messages around this message ID */
1508
+ around: Snowflake;
1509
+ /** get messages before this message ID */
1510
+ before: Snowflake;
1511
+ /** get messages after this message ID */
1512
+ after: Snowflake;
1513
+ /** max number of messages to return (1-100) */
1514
+ limit: number;
1515
+ }
1516
+ export interface GetCurrentUserGuildParams {
1517
+ /** get guilds before this guild ID */
1518
+ before: Snowflake;
1519
+ /** get guilds after this guild ID */
1520
+ after: Snowflake;
1521
+ /** max number of guilds to return (1-200) */
1522
+ limit: number;
1523
+ }
1524
+ export interface GetGatewayBotResponse {
1525
+ /** The WSS URL that can be used for connecting to the gateway */
1526
+ url: string;
1527
+ /** The recommended number of shards to use when connecting */
1528
+ shards: number;
1529
+ /** Information on the current session start limit */
1530
+ session_start_limit: SessionStartLimit;
1531
+ }
1532
+ export interface GetGuildAuditLogParams {
1533
+ /** filter the log for actions made by a user */
1534
+ user_id: Snowflake;
1535
+ /** the type of audit log event */
1536
+ action_type: AuditLogEvent;
1537
+ /** filter the log before a certain entry id */
1538
+ before: Snowflake;
1539
+ /** how many entries are returned (default 50, minimum 1, maximum 100) */
1540
+ limit: number;
1541
+ }
1542
+ export interface GetGuildParams {
1543
+ /** when true, will return approximate member and presence counts for the guild */
1544
+ with_counts?: boolean;
1545
+ }
1546
+ export interface GetGuildPruneCountParams {
1547
+ /** number of days to count prune for (1-30) */
1548
+ days: number;
1549
+ /** role(s) to include */
1550
+ include_roles: Snowflake[];
1551
+ }
1552
+ export interface GetGuildScheduledEventParams {
1553
+ /** include number of users subscribed to this event */
1554
+ with_user_count?: boolean;
1555
+ }
1556
+ export interface GetGuildScheduledEventUserParams {
1557
+ /** number of users to return (up to maximum 100) */
1558
+ limit?: Number;
1559
+ /** include guild member data if it exists */
1560
+ with_member?: boolean;
1561
+ /** consider only users before given user id */
1562
+ before?: Snowflake;
1563
+ /** consider only users after given user id */
1564
+ after?: Snowflake;
1565
+ }
1566
+ export interface GetGuildWidget {
1567
+ /** guild id */
1568
+ id: Snowflake;
1569
+ /** guild name (2-100 characters) */
1570
+ name: string;
1571
+ /** instant invite for the guilds specified widget invite channel */
1572
+ instant_invite?: string | null;
1573
+ /** voice and stage channels which are accessible by @everyone */
1574
+ channels: Channel[];
1575
+ /** special widget user objects that includes users presence (Limit 100) */
1576
+ members: User[];
1577
+ /** number of online members in this guild */
1578
+ presence_count: number;
1579
+ }
1580
+ export interface GetGuildWidgetImageParams {
1581
+ /** style of the widget image returned (see below) */
1582
+ style: string;
1583
+ }
1584
+ export interface GetInviteParams {
1585
+ /** whether the invite should contain approximate member counts */
1586
+ with_counts?: boolean;
1587
+ /** whether the invite should contain the expiration date */
1588
+ with_expiration?: boolean;
1589
+ /** the guild scheduled event to include with the invite */
1590
+ guild_scheduled_event_id?: Snowflake;
1591
+ }
1592
+ export interface GetReactionParams {
1593
+ /** get users after this user ID */
1594
+ after: Snowflake;
1595
+ /** max number of users to return (1-100) */
1596
+ limit: number;
1597
+ }
1598
+ export interface GetWebhookMessageParams {
1599
+ /** id of the thread the message is in */
1600
+ thread_id: Snowflake;
1601
+ }
1602
+ export interface GroupDmAddRecipientParams {
1603
+ /** access token of a user that has granted your app the gdm.join scope */
1604
+ access_token: string;
1605
+ /** nickname of the user being added */
1606
+ nick: string;
1607
+ }
1608
+ export interface Guild {
1609
+ /** guild id */
1610
+ id: Snowflake;
1611
+ /** guild name (2-100 characters, excluding trailing and leading whitespace) */
1612
+ name: string;
1613
+ /** icon hash */
1614
+ icon?: string | null;
1615
+ /** icon hash, returned when in the template object */
1616
+ icon_hash?: string | null;
1617
+ /** splash hash */
1618
+ splash?: string | null;
1619
+ /** discovery splash hash; only present for guilds with the "DISCOVERABLE" feature */
1620
+ discovery_splash?: string | null;
1621
+ /** true if the user is the owner of the guild */
1622
+ owner?: boolean;
1623
+ /** id of owner */
1624
+ owner_id: Snowflake;
1625
+ /** total permissions for the user in the guild (excludes overwrites) */
1626
+ permissions?: string;
1627
+ /** voice region id for the guild (deprecated) */
1628
+ region?: string | null;
1629
+ /** id of afk channel */
1630
+ afk_channel_id?: Snowflake | null;
1631
+ /** afk timeout in seconds */
1632
+ afk_timeout: number;
1633
+ /** true if the server widget is enabled */
1634
+ widget_enabled?: boolean;
1635
+ /** the channel id that the widget will generate an invite to, or null if set to no invite */
1636
+ widget_channel_id?: Snowflake | null;
1637
+ /** verification level required for the guild */
1638
+ verification_level: VerificationLevel;
1639
+ /** default message notifications level */
1640
+ default_message_notifications: DefaultMessageNotificationLevel;
1641
+ /** explicit content filter level */
1642
+ explicit_content_filter: ExplicitContentFilterLevel;
1643
+ /** roles in the guild */
1644
+ roles: Role[];
1645
+ /** custom guild emojis */
1646
+ emojis: Emoji[];
1647
+ /** enabled guild features */
1648
+ features: GuildFeature[];
1649
+ /** required MFA level for the guild */
1650
+ mfa_level: MfaLevel;
1651
+ /** application id of the guild creator if it is bot-created */
1652
+ application_id?: Snowflake | null;
1653
+ /** the id of the channel where guild notices such as welcome messages and boost events are posted */
1654
+ system_channel_id?: Snowflake | null;
1655
+ /** system channel flags */
1656
+ system_channel_flags: number;
1657
+ /** the id of the channel where Community guilds can display rules and/or guidelines */
1658
+ rules_channel_id?: Snowflake | null;
1659
+ /** when this guild was joined at */
1660
+ joined_at?: string;
1661
+ /** true if this is considered a large guild */
1662
+ large?: boolean;
1663
+ /** true if this guild is unavailable due to an outage */
1664
+ unavailable?: boolean;
1665
+ /** total number of members in this guild */
1666
+ member_count?: number;
1667
+ /** states of members currently in voice channels; lacks the guild_id key */
1668
+ voice_states?: VoiceState[];
1669
+ /** users in the guild */
1670
+ members?: GuildMember[];
1671
+ /** channels in the guild */
1672
+ channels?: Channel[];
1673
+ /** all active threads in the guild that current user has permission to view */
1674
+ threads?: Channel[];
1675
+ /** presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
1676
+ presences?: PresenceUpdateEvent[];
1677
+ /** the maximum number of presences for the guild (null is always returned, apart from the largest of guilds) */
1678
+ max_presences?: number | null;
1679
+ /** the maximum number of members for the guild */
1680
+ max_members?: number;
1681
+ /** the vanity url code for the guild */
1682
+ vanity_url_code?: string | null;
1683
+ /** the description of a Community guild */
1684
+ description?: string | null;
1685
+ /** banner hash */
1686
+ banner?: string | null;
1687
+ /** premium tier (Server Boost level) */
1688
+ premium_tier: PremiumTier;
1689
+ /** the number of boosts this guild currently has */
1690
+ premium_subscription_count?: number;
1691
+ /** the preferred locale of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US" */
1692
+ preferred_locale: string;
1693
+ /** the id of the channel where admins and moderators of Community guilds receive notices from Discord */
1694
+ public_updates_channel_id?: Snowflake | null;
1695
+ /** the maximum amount of users in a video channel */
1696
+ max_video_channel_users?: number;
1697
+ /** approximate number of members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true */
1698
+ approximate_member_count?: number;
1699
+ /** approximate number of non-offline members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true */
1700
+ approximate_presence_count?: number;
1701
+ /** the welcome screen of a Community guild, shown to new members, returned in an Invite's guild object */
1702
+ welcome_screen?: WelcomeScreen;
1703
+ /** guild NSFW level */
1704
+ nsfw_level: GuildNsfwLevel;
1705
+ /** Stage instances in the guild */
1706
+ stage_instances?: StageInstance[];
1707
+ /** custom guild stickers */
1708
+ stickers?: Sticker[];
1709
+ /** the scheduled events in the guild */
1710
+ guild_scheduled_events?: GuildScheduledEvent[];
1711
+ /** whether the guild has the boost progress bar enabled */
1712
+ premium_progress_bar_enabled: boolean;
1713
+ }
1714
+ export interface GuildApplicationCommandPermission {
1715
+ /** the id of the command */
1716
+ id: Snowflake;
1717
+ /** the id of the application the command belongs to */
1718
+ application_id: Snowflake;
1719
+ /** the id of the guild */
1720
+ guild_id: Snowflake;
1721
+ /** the permissions for the command in the guild */
1722
+ permissions: ApplicationCommandPermission[];
1723
+ }
1724
+ export interface GuildBanAddEvent {
1725
+ /** id of the guild */
1726
+ guild_id: Snowflake;
1727
+ /** the banned user */
1728
+ user: User;
1729
+ }
1730
+ export interface GuildBanRemoveEvent {
1731
+ /** id of the guild */
1732
+ guild_id: Snowflake;
1733
+ /** the unbanned user */
1734
+ user: User;
1735
+ }
1736
+ export declare type GuildCreateEvent = Guild;
1737
+ export declare type GuildDeleteEvent = UnavailableGuild;
1738
+ export interface GuildEmojisUpdateEvent {
1739
+ /** id of the guild */
1740
+ guild_id: Snowflake;
1741
+ /** array of emojis */
1742
+ emojis: Emoji[];
1743
+ }
1744
+ export declare enum GuildFeature {
1745
+ /** guild has access to set an animated guild icon */
1746
+ ANIMATED_ICON = "ANIMATED_ICON",
1747
+ /** guild has access to set a guild banner image */
1748
+ BANNER = "BANNER",
1749
+ /** guild has access to use commerce features (i.e. create store channels) */
1750
+ COMMERCE = "COMMERCE",
1751
+ /** guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates */
1752
+ COMMUNITY = "COMMUNITY",
1753
+ /** guild is able to be discovered in the directory */
1754
+ DISCOVERABLE = "DISCOVERABLE",
1755
+ /** guild is able to be featured in the directory */
1756
+ FEATURABLE = "FEATURABLE",
1757
+ /** guild has access to set an invite splash background */
1758
+ INVITE_SPLASH = "INVITE_SPLASH",
1759
+ /** guild has enabled Membership Screening */
1760
+ MEMBER_VERIFICATION_GATE_ENABLED = "MEMBER_VERIFICATION_GATE_ENABLED",
1761
+ /** guild has enabled monetization */
1762
+ MONETIZATION_ENABLED = "MONETIZATION_ENABLED",
1763
+ /** guild has increased custom sticker slots */
1764
+ MORE_STICKERS = "MORE_STICKERS",
1765
+ /** guild has access to create news channels */
1766
+ NEWS = "NEWS",
1767
+ /** guild is partnered */
1768
+ PARTNERED = "PARTNERED",
1769
+ /** guild can be previewed before joining via Membership Screening or the directory */
1770
+ PREVIEW_ENABLED = "PREVIEW_ENABLED",
1771
+ /** guild has access to create private threads */
1772
+ PRIVATE_THREADS = "PRIVATE_THREADS",
1773
+ /** guild is able to set role icons */
1774
+ ROLE_ICONS = "ROLE_ICONS",
1775
+ /** guild has access to the seven day archive time for threads */
1776
+ SEVEN_DAY_THREAD_ARCHIVE = "SEVEN_DAY_THREAD_ARCHIVE",
1777
+ /** guild has access to the three day archive time for threads */
1778
+ THREE_DAY_THREAD_ARCHIVE = "THREE_DAY_THREAD_ARCHIVE",
1779
+ /** guild has enabled ticketed events */
1780
+ TICKETED_EVENTS_ENABLED = "TICKETED_EVENTS_ENABLED",
1781
+ /** guild has access to set a vanity URL */
1782
+ VANITY_URL = "VANITY_URL",
1783
+ /** guild is verified */
1784
+ VERIFIED = "VERIFIED",
1785
+ /** guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */
1786
+ VIP_REGIONS = "VIP_REGIONS",
1787
+ /** guild has enabled the welcome screen */
1788
+ WELCOME_SCREEN_ENABLED = "WELCOME_SCREEN_ENABLED"
1789
+ }
1790
+ export interface GuildIntegrationsUpdateEvent {
1791
+ /** id of the guild whose integrations were updated */
1792
+ guild_id: Snowflake;
1793
+ }
1794
+ export interface GuildMember {
1795
+ /** the user this guild member represents */
1796
+ user?: User;
1797
+ /** this user's guild nickname */
1798
+ nick?: string | null;
1799
+ /** the member's guild avatar hash */
1800
+ avatar?: string | null;
1801
+ /** array of role object ids */
1802
+ roles: Snowflake[];
1803
+ /** when the user joined the guild */
1804
+ joined_at: string;
1805
+ /** when the user started boosting the guild */
1806
+ premium_since?: string | null;
1807
+ /** whether the user is deafened in voice channels */
1808
+ deaf: boolean;
1809
+ /** whether the user is muted in voice channels */
1810
+ mute: boolean;
1811
+ /** whether the user has not yet passed the guild's Membership Screening requirements */
1812
+ pending?: boolean;
1813
+ /** total permissions of the member in the channel, including overwrites, returned when in the interaction object */
1814
+ permissions?: string;
1815
+ /** when the user's timeout 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 */
1816
+ communication_disabled_until?: string | null;
1817
+ }
1818
+ export declare type GuildMemberAddEvent = GuildMember & GuildMemberAddExtra;
1819
+ export interface GuildMemberAddExtra {
1820
+ /** id of the guild */
1821
+ guild_id: Snowflake;
1822
+ }
1823
+ export interface GuildMemberRemoveEvent {
1824
+ /** the id of the guild */
1825
+ guild_id: Snowflake;
1826
+ /** the user who was removed */
1827
+ user: User;
1828
+ }
1829
+ export interface GuildMembersChunkEvent {
1830
+ /** the id of the guild */
1831
+ guild_id: Snowflake;
1832
+ /** set of guild members */
1833
+ members: GuildMember[];
1834
+ /** the chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count) */
1835
+ chunk_index: number;
1836
+ /** the total number of expected chunks for this response */
1837
+ chunk_count: number;
1838
+ /** if passing an invalid id to REQUEST_GUILD_MEMBERS, it will be returned here */
1839
+ not_found?: any[];
1840
+ /** if passing true to REQUEST_GUILD_MEMBERS, presences of the returned members will be here */
1841
+ presences?: PresenceUpdateEvent[];
1842
+ /** the nonce used in the Guild Members Request */
1843
+ nonce?: string;
1844
+ }
1845
+ export interface GuildMemberUpdateEvent {
1846
+ /** the id of the guild */
1847
+ guild_id: Snowflake;
1848
+ /** user role ids */
1849
+ roles: Snowflake[];
1850
+ /** the user */
1851
+ user: User;
1852
+ /** nickname of the user in the guild */
1853
+ nick?: string | null;
1854
+ /** the member's guild avatar hash */
1855
+ avatar?: string | null;
1856
+ /** when the user joined the guild */
1857
+ joined_at?: string | null;
1858
+ /** when the user starting boosting the guild */
1859
+ premium_since?: string | null;
1860
+ /** whether the user is deafened in voice channels */
1861
+ deaf?: boolean;
1862
+ /** whether the user is muted in voice channels */
1863
+ mute?: boolean;
1864
+ /** whether the user has not yet passed the guild's Membership Screening requirements */
1865
+ pending?: boolean;
1866
+ /** when the user's timeout 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 */
1867
+ communication_disabled_until?: string | null;
1868
+ }
1869
+ export declare enum GuildNsfwLevel {
1870
+ DEFAULT = 0,
1871
+ EXPLICIT = 1,
1872
+ SAFE = 2,
1873
+ AGE_RESTRICTED = 3
1874
+ }
1875
+ export interface GuildPreview {
1876
+ /** guild id */
1877
+ id: Snowflake;
1878
+ /** guild name (2-100 characters) */
1879
+ name: string;
1880
+ /** icon hash */
1881
+ icon?: string | null;
1882
+ /** splash hash */
1883
+ splash?: string | null;
1884
+ /** discovery splash hash */
1885
+ discovery_splash?: string | null;
1886
+ /** custom guild emojis */
1887
+ emojis: Emoji[];
1888
+ /** enabled guild features */
1889
+ features: GuildFeature[];
1890
+ /** approximate number of members in this guild */
1891
+ approximate_member_count: number;
1892
+ /** approximate number of online members in this guild */
1893
+ approximate_presence_count: number;
1894
+ /** the description for the guild, if the guild is discoverable */
1895
+ description?: string | null;
1896
+ /** custom guild stickers */
1897
+ stickers: Sticker[];
1898
+ }
1899
+ export interface GuildRoleCreateEvent {
1900
+ /** the id of the guild */
1901
+ guild_id: Snowflake;
1902
+ /** the role created */
1903
+ role: Role;
1904
+ }
1905
+ export interface GuildRoleDeleteEvent {
1906
+ /** id of the guild */
1907
+ guild_id: Snowflake;
1908
+ /** id of the role */
1909
+ role_id: Snowflake;
1910
+ }
1911
+ export interface GuildRoleUpdateEvent {
1912
+ /** the id of the guild */
1913
+ guild_id: Snowflake;
1914
+ /** the role updated */
1915
+ role: Role;
1916
+ }
1917
+ export interface GuildScheduledEvent {
1918
+ /** the id of the scheduled event */
1919
+ id: Snowflake;
1920
+ /** the guild id which the scheduled event belongs to */
1921
+ guild_id: Snowflake;
1922
+ /** the channel id in which the scheduled event will be hosted, or null if scheduled entity type is EXTERNAL */
1923
+ channel_id?: Snowflake | null;
1924
+ /** the id of the user that created the scheduled event * */
1925
+ creator_id?: Snowflake | null;
1926
+ /** the name of the scheduled event (1-100 characters) */
1927
+ name: string;
1928
+ /** the description of the scheduled event (1-1000 characters) */
1929
+ description?: string | null;
1930
+ /** the time the scheduled event will start */
1931
+ scheduled_start_time: string;
1932
+ /** the time the scheduled event will end, required if entity_type is EXTERNAL */
1933
+ scheduled_end_time?: string | null;
1934
+ /** the privacy level of the scheduled event */
1935
+ privacy_level: GuildScheduledEventPrivacyLevel;
1936
+ /** the status of the scheduled event */
1937
+ status: GuildScheduledEventStatus;
1938
+ /** the type of the scheduled event */
1939
+ entity_type: GuildScheduledEventEntityType;
1940
+ /** the id of an entity associated with a guild scheduled event */
1941
+ entity_id?: Snowflake | null;
1942
+ /** additional metadata for the guild scheduled event */
1943
+ entity_metadata?: GuildScheduledEventEntityMetadatum | null;
1944
+ /** the user that created the scheduled event */
1945
+ creator?: User;
1946
+ /** the number of users subscribed to the scheduled event */
1947
+ user_count?: number;
1948
+ /** the cover image hash of the scheduled event */
1949
+ image?: string | null;
1950
+ }
1951
+ export declare type GuildScheduledEventCreateEvent = GuildScheduledEvent;
1952
+ export declare type GuildScheduledEventDeleteEvent = GuildScheduledEvent;
1953
+ export interface GuildScheduledEventEntityMetadatum {
1954
+ /** location of the event (1-100 characters) */
1955
+ location?: string;
1956
+ }
1957
+ export declare enum GuildScheduledEventEntityType {
1958
+ STAGE_INSTANCE = 1,
1959
+ VOICE = 2,
1960
+ EXTERNAL = 3
1961
+ }
1962
+ export declare enum GuildScheduledEventPrivacyLevel {
1963
+ /** the scheduled event is only accessible to guild members */
1964
+ GUILD_ONLY = 2
1965
+ }
1966
+ export declare enum GuildScheduledEventStatus {
1967
+ SCHEDULED = 1,
1968
+ ACTIVE = 2,
1969
+ COMPLETED = 3,
1970
+ CANCELED = 4
1971
+ }
1972
+ export declare type GuildScheduledEventUpdateEvent = GuildScheduledEvent;
1973
+ export interface GuildScheduledEventUser {
1974
+ /** the scheduled event id which the user subscribed to */
1975
+ guild_scheduled_event_id: Snowflake;
1976
+ /** user which subscribed to an event */
1977
+ user: User;
1978
+ /** guild member data for this user for the guild which this event belongs to, if any */
1979
+ member?: GuildMember;
1980
+ }
1981
+ export interface GuildScheduledEventUserAddEvent {
1982
+ /** id of the guild scheduled event */
1983
+ guild_scheduled_event_id: Snowflake;
1984
+ /** id of the user */
1985
+ user_id: Snowflake;
1986
+ /** id of the guild */
1987
+ guild_id: Snowflake;
1988
+ }
1989
+ export interface GuildScheduledEventUserRemoveEvent {
1990
+ /** id of the guild scheduled event */
1991
+ guild_scheduled_event_id: Snowflake;
1992
+ /** id of the user */
1993
+ user_id: Snowflake;
1994
+ /** id of the guild */
1995
+ guild_id: Snowflake;
1996
+ }
1997
+ export interface GuildStickersUpdateEvent {
1998
+ /** id of the guild */
1999
+ guild_id: Snowflake;
2000
+ /** array of stickers */
2001
+ stickers: Sticker[];
2002
+ }
2003
+ export interface GuildTemplate {
2004
+ /** the template code (unique ID) */
2005
+ code: string;
2006
+ /** template name */
2007
+ name: string;
2008
+ /** the description for the template */
2009
+ description?: string | null;
2010
+ /** number of times this template has been used */
2011
+ usage_count: number;
2012
+ /** the ID of the user who created the template */
2013
+ creator_id: Snowflake;
2014
+ /** the user who created the template */
2015
+ creator: User;
2016
+ /** when this template was created */
2017
+ created_at: string;
2018
+ /** when this template was last synced to the source guild */
2019
+ updated_at: string;
2020
+ /** the ID of the guild this template is based on */
2021
+ source_guild_id: Snowflake;
2022
+ /** the guild snapshot this template contains */
2023
+ serialized_source_guild: Guild;
2024
+ /** whether the template has unsynced changes */
2025
+ is_dirty?: boolean | null;
2026
+ }
2027
+ export declare type GuildUpdateEvent = Guild;
2028
+ export interface GuildWidgetSetting {
2029
+ /** whether the widget is enabled */
2030
+ enabled: boolean;
2031
+ /** the widget channel id */
2032
+ channel_id?: Snowflake | null;
2033
+ }
2034
+ export declare type Heartbeat = number | null;
2035
+ export interface HelloEvent {
2036
+ /** the interval (in milliseconds) the client should heartbeat with */
2037
+ heartbeat_interval: number;
2038
+ }
2039
+ export interface Identify {
2040
+ /** authentication token */
2041
+ token: string;
2042
+ /** connection properties */
2043
+ properties: IdentifyConnectionProperty;
2044
+ /** whether this connection supports compression of packets */
2045
+ compress?: boolean;
2046
+ /** value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list */
2047
+ large_threshold?: number;
2048
+ /** used for Guild Sharding */
2049
+ shard?: number[];
2050
+ /** presence structure for initial presence information */
2051
+ presence?: UpdatePresence;
2052
+ /** the Gateway Intents you wish to receive */
2053
+ intents: number;
2054
+ }
2055
+ export interface IdentifyConnectionProperty {
2056
+ /** your operating system */
2057
+ $os: string;
2058
+ /** your library name */
2059
+ $browser: string;
2060
+ /** your library name */
2061
+ $device: string;
2062
+ }
2063
+ export interface Integration {
2064
+ /** integration id */
2065
+ id: Snowflake;
2066
+ /** integration name */
2067
+ name: string;
2068
+ /** integration type (twitch, youtube, or discord) */
2069
+ type: string;
2070
+ /** is this integration enabled */
2071
+ enabled: boolean;
2072
+ /** is this integration syncing */
2073
+ syncing?: boolean;
2074
+ /** id that this integration uses for "subscribers" */
2075
+ role_id?: Snowflake;
2076
+ /** whether emoticons should be synced for this integration (twitch only currently) */
2077
+ enable_emoticons?: boolean;
2078
+ /** the behavior of expiring subscribers */
2079
+ expire_behavior?: IntegrationExpireBehavior;
2080
+ /** the grace period (in days) before expiring subscribers */
2081
+ expire_grace_period?: number;
2082
+ /** user for this integration */
2083
+ user?: User;
2084
+ /** integration account information */
2085
+ account: IntegrationAccount;
2086
+ /** when this integration was last synced */
2087
+ synced_at?: string;
2088
+ /** how many subscribers this integration has */
2089
+ subscriber_count?: number;
2090
+ /** has this integration been revoked */
2091
+ revoked?: boolean;
2092
+ /** The bot/OAuth2 application for discord integrations */
2093
+ application?: IntegrationApplication;
2094
+ }
2095
+ export interface IntegrationAccount {
2096
+ /** id of the account */
2097
+ id: string;
2098
+ /** name of the account */
2099
+ name: string;
2100
+ }
2101
+ export interface IntegrationApplication {
2102
+ /** the id of the app */
2103
+ id: Snowflake;
2104
+ /** the name of the app */
2105
+ name: string;
2106
+ /** the icon hash of the app */
2107
+ icon?: string | null;
2108
+ /** the description of the app */
2109
+ description: string;
2110
+ /** the summary of the app */
2111
+ summary: string;
2112
+ /** the bot associated with this application */
2113
+ bot?: User;
2114
+ }
2115
+ export declare type IntegrationCreateEvent = Integration & IntegrationCreateEventAdditional;
2116
+ export interface IntegrationCreateEventAdditional {
2117
+ /** id of the guild */
2118
+ guild_id: Snowflake;
2119
+ }
2120
+ export interface IntegrationDeleteEvent {
2121
+ /** integration id */
2122
+ id: Snowflake;
2123
+ /** id of the guild */
2124
+ guild_id: Snowflake;
2125
+ /** id of the bot/OAuth2 application for this discord integration */
2126
+ application_id?: Snowflake;
2127
+ }
2128
+ export declare enum IntegrationExpireBehavior {
2129
+ REMOVE_ROLE = 0,
2130
+ KICK = 1
2131
+ }
2132
+ export declare type IntegrationUpdateEvent = Integration & IntegrationUpdateEventAdditional;
2133
+ export interface IntegrationUpdateEventAdditional {
2134
+ /** id of the guild */
2135
+ guild_id: Snowflake;
2136
+ }
2137
+ export interface Interaction {
2138
+ /** id of the interaction */
2139
+ id: Snowflake;
2140
+ /** id of the application this interaction is for */
2141
+ application_id: Snowflake;
2142
+ /** the type of interaction */
2143
+ type: InteractionType;
2144
+ /** the command data payload */
2145
+ data?: InteractionDatum;
2146
+ /** the guild it was sent from */
2147
+ guild_id?: Snowflake;
2148
+ /** the channel it was sent from */
2149
+ channel_id?: Snowflake;
2150
+ /** guild member data for the invoking user, including permissions */
2151
+ member?: GuildMember;
2152
+ /** user object for the invoking user, if invoked in a DM */
2153
+ user?: User;
2154
+ /** a continuation token for responding to the interaction */
2155
+ token: string;
2156
+ /** read-only property, always 1 */
2157
+ version: number;
2158
+ /** for components, the message they were attached to */
2159
+ message?: Message;
2160
+ /** the selected language of the invoking user */
2161
+ locale?: string;
2162
+ /** the guild's preferred locale, if invoked in a guild */
2163
+ guild_locale?: string;
2164
+ }
2165
+ export interface InteractionCallbackAutocomplete {
2166
+ /** autocomplete choices (max of 25 choices) */
2167
+ choices: ApplicationCommandOptionChoice[];
2168
+ }
2169
+ export declare type InteractionCallbackDatum = InteractionCallbackAutocomplete | InteractionCallbackMessage | InteractionCallbackModal;
2170
+ export interface InteractionCallbackMessage {
2171
+ /** is the response TTS */
2172
+ tts?: boolean;
2173
+ /** message content */
2174
+ content?: string;
2175
+ /** supports up to 10 embeds */
2176
+ embeds?: Embed[];
2177
+ /** allowed mentions object */
2178
+ allowed_mentions?: AllowedMention;
2179
+ /** message flags combined as a bitfield (only SUPPRESS_EMBEDS and EPHEMERAL can be set) */
2180
+ flags?: number;
2181
+ /** message components */
2182
+ components?: Component[];
2183
+ /** attachment objects with filename and description */
2184
+ attachments?: Attachment[];
2185
+ }
2186
+ export interface InteractionCallbackModal {
2187
+ /** a developer-defined identifier for the component, max 100 characters */
2188
+ custom_id: string;
2189
+ /** the title of the popup modal */
2190
+ title: string;
2191
+ /** between 1 and 5 (inclusive) components that make up the modal */
2192
+ components: Component[];
2193
+ }
2194
+ export declare enum InteractionCallbackType {
2195
+ /** ACK a Ping */
2196
+ PONG = 1,
2197
+ /** respond to an interaction with a message */
2198
+ CHANNEL_MESSAGE_WITH_SOURCE = 4,
2199
+ /** ACK an interaction and edit a response later, the user sees a loading state */
2200
+ DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE = 5,
2201
+ /** for components, ACK an interaction and edit the original message later; the user does not see a loading state */
2202
+ DEFERRED_UPDATE_MESSAGE = 6,
2203
+ /** for components, edit the message the component was attached to */
2204
+ UPDATE_MESSAGE = 7,
2205
+ /** respond to an autocomplete interaction with suggested choices */
2206
+ APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
2207
+ /** respond to an interaction with a popup modal */
2208
+ MODAL = 9
2209
+ }
2210
+ export declare type InteractionCreateEvent = Interaction;
2211
+ export interface InteractionDatum {
2212
+ /** the ID of the invoked command */
2213
+ id: Snowflake;
2214
+ /** the name of the invoked command */
2215
+ name: string;
2216
+ /** the type of the invoked command */
2217
+ type: number;
2218
+ /** converted users + roles + channels + attachments */
2219
+ resolved?: ResolvedDatum;
2220
+ /** the params + values from the user */
2221
+ options?: ApplicationCommandInteractionDataOption[];
2222
+ /** the custom_id of the component */
2223
+ custom_id?: string;
2224
+ /** the type of the component */
2225
+ component_type?: ComponentType;
2226
+ /** the values the user selected */
2227
+ values?: SelectOption[];
2228
+ /** id the of user or message targeted by a user or message command */
2229
+ target_id?: Snowflake;
2230
+ /** the values submitted by the user */
2231
+ components?: Component[];
2232
+ }
2233
+ export interface InteractionResponse {
2234
+ /** the type of response */
2235
+ type: InteractionCallbackType;
2236
+ /** an optional response message */
2237
+ data?: InteractionCallbackDatum;
2238
+ }
2239
+ export declare enum InteractionType {
2240
+ PING = 1,
2241
+ APPLICATION_COMMAND = 2,
2242
+ MESSAGE_COMPONENT = 3,
2243
+ APPLICATION_COMMAND_AUTOCOMPLETE = 4,
2244
+ MODAL_SUBMIT = 5
2245
+ }
2246
+ export declare type InvalidSessionEvent = boolean;
2247
+ export interface Invite {
2248
+ /** the invite code (unique ID) */
2249
+ code: string;
2250
+ /** the guild this invite is for */
2251
+ guild?: Guild;
2252
+ /** the channel this invite is for */
2253
+ channel?: Channel | null;
2254
+ /** the user who created the invite */
2255
+ inviter?: User;
2256
+ /** the type of target for this voice channel invite */
2257
+ target_type?: InviteTargetType;
2258
+ /** the user whose stream to display for this voice channel stream invite */
2259
+ target_user?: User;
2260
+ /** the embedded application to open for this voice channel embedded application invite */
2261
+ target_application?: Application;
2262
+ /** approximate count of online members, returned from the GET /invites/<code> endpoint when with_counts is true */
2263
+ approximate_presence_count?: number;
2264
+ /** approximate count of total members, returned from the GET /invites/<code> endpoint when with_counts is true */
2265
+ approximate_member_count?: number;
2266
+ /** the expiration date of this invite, returned from the GET /invites/<code> endpoint when with_expiration is true */
2267
+ expires_at?: string | null;
2268
+ /** stage instance data if there is a public Stage instance in the Stage channel this invite is for (deprecated) */
2269
+ stage_instance?: InviteStageInstance;
2270
+ /** guild scheduled event data, only included if guild_scheduled_event_id contains a valid guild scheduled event id */
2271
+ guild_scheduled_event?: GuildScheduledEvent;
2272
+ }
2273
+ export interface InviteCreateEvent {
2274
+ /** the channel the invite is for */
2275
+ channel_id: Snowflake;
2276
+ /** the unique invite code */
2277
+ code: string;
2278
+ /** the time at which the invite was created */
2279
+ created_at: string;
2280
+ /** the guild of the invite */
2281
+ guild_id?: Snowflake;
2282
+ /** the user that created the invite */
2283
+ inviter?: User;
2284
+ /** how long the invite is valid for (in seconds) */
2285
+ max_age: number;
2286
+ /** the maximum number of times the invite can be used */
2287
+ max_uses: number;
2288
+ /** the type of target for this voice channel invite */
2289
+ target_type?: InviteTargetType;
2290
+ /** the user whose stream to display for this voice channel stream invite */
2291
+ target_user?: User;
2292
+ /** the embedded application to open for this voice channel embedded application invite */
2293
+ target_application?: Application;
2294
+ /** whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */
2295
+ temporary: boolean;
2296
+ /** how many times the invite has been used (always will be 0) */
2297
+ uses: number;
2298
+ }
2299
+ export interface InviteDeleteEvent {
2300
+ /** the channel of the invite */
2301
+ channel_id: Snowflake;
2302
+ /** the guild of the invite */
2303
+ guild_id?: Snowflake;
2304
+ /** the unique invite code */
2305
+ code: string;
2306
+ }
2307
+ export interface InviteMetadatum {
2308
+ /** number of times this invite has been used */
2309
+ uses: number;
2310
+ /** max number of times this invite can be used */
2311
+ max_uses: number;
2312
+ /** duration (in seconds) after which the invite expires */
2313
+ max_age: number;
2314
+ /** whether this invite only grants temporary membership */
2315
+ temporary: boolean;
2316
+ /** when this invite was created */
2317
+ created_at: string;
2318
+ }
2319
+ export interface InviteStageInstance {
2320
+ /** the members speaking in the Stage */
2321
+ members: GuildMember[];
2322
+ /** the number of users in the Stage */
2323
+ participant_count: number;
2324
+ /** the number of users speaking in the Stage */
2325
+ speaker_count: number;
2326
+ /** the topic of the Stage instance (1-120 characters) */
2327
+ topic: string;
2328
+ }
2329
+ export declare enum InviteTargetType {
2330
+ STREAM = 1,
2331
+ EMBEDDED_APPLICATION = 2
2332
+ }
2333
+ export interface ListActiveThreadResponse {
2334
+ /** the active threads */
2335
+ threads: Channel[];
2336
+ /** a thread member object for each returned thread the current user has joined */
2337
+ members: ThreadMember[];
2338
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
2339
+ has_more: boolean;
2340
+ }
2341
+ export interface ListGuildActiveThreadResponse {
2342
+ /** the active threads */
2343
+ threads: Channel[];
2344
+ /** a thread member object for each returned thread the current user has joined */
2345
+ members: ThreadMember[];
2346
+ }
2347
+ export interface ListGuildMemberParams {
2348
+ /** max number of members to return (1-1000) */
2349
+ limit: number;
2350
+ /** the highest user id in the previous page */
2351
+ after: Snowflake;
2352
+ }
2353
+ export interface ListJoinedPrivateArchivedThreadParams {
2354
+ /** returns threads before this id */
2355
+ before?: Snowflake;
2356
+ /** optional maximum number of threads to return */
2357
+ limit?: number;
2358
+ }
2359
+ export interface ListJoinedPrivateArchivedThreadResponse {
2360
+ /** the private, archived threads the current user has joined */
2361
+ threads: Channel[];
2362
+ /** a thread member object for each returned thread the current user has joined */
2363
+ members: ThreadMember[];
2364
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
2365
+ has_more: boolean;
2366
+ }
2367
+ export interface ListPrivateArchivedThreadParams {
2368
+ /** returns threads before this timestamp */
2369
+ before?: string;
2370
+ /** optional maximum number of threads to return */
2371
+ limit?: number;
2372
+ }
2373
+ export interface ListPrivateArchivedThreadResponse {
2374
+ /** the private, archived threads */
2375
+ threads: Channel[];
2376
+ /** a thread member object for each returned thread the current user has joined */
2377
+ members: ThreadMember[];
2378
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
2379
+ has_more: boolean;
2380
+ }
2381
+ export interface ListPublicArchivedThreadParams {
2382
+ /** returns threads before this timestamp */
2383
+ before?: string;
2384
+ /** optional maximum number of threads to return */
2385
+ limit?: number;
2386
+ }
2387
+ export interface ListPublicArchivedThreadResponse {
2388
+ /** the public, archived threads */
2389
+ threads: Channel[];
2390
+ /** a thread member object for each returned thread the current user has joined */
2391
+ members: ThreadMember[];
2392
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
2393
+ has_more: boolean;
2394
+ }
2395
+ export interface ListScheduledEventsForGuildParams {
2396
+ /** include number of users subscribed to each event */
2397
+ with_user_count?: boolean;
2398
+ }
2399
+ export declare enum MembershipState {
2400
+ INVITED = 1,
2401
+ ACCEPTED = 2
2402
+ }
2403
+ export interface Message {
2404
+ /** id of the message */
2405
+ id: Snowflake;
2406
+ /** id of the channel the message was sent in */
2407
+ channel_id: Snowflake;
2408
+ /** id of the guild the message was sent in */
2409
+ guild_id?: Snowflake;
2410
+ /** the author of this message (not guaranteed to be a valid user, see below) */
2411
+ author: User;
2412
+ /** member properties for this message's author */
2413
+ member?: GuildMember;
2414
+ /** contents of the message */
2415
+ content: string;
2416
+ /** when this message was sent */
2417
+ timestamp: string;
2418
+ /** when this message was edited (or null if never) */
2419
+ edited_timestamp?: string | null;
2420
+ /** whether this was a TTS message */
2421
+ tts: boolean;
2422
+ /** whether this message mentions everyone */
2423
+ mention_everyone: boolean;
2424
+ /** users specifically mentioned in the message */
2425
+ mentions: User[];
2426
+ /** roles specifically mentioned in this message */
2427
+ mention_roles: Snowflake[];
2428
+ /** channels specifically mentioned in this message */
2429
+ mention_channels?: ChannelMention[];
2430
+ /** any attached files */
2431
+ attachments: Attachment[];
2432
+ /** any embedded content */
2433
+ embeds: Embed[];
2434
+ /** reactions to the message */
2435
+ reactions?: Reaction[];
2436
+ /** used for validating a message was sent */
2437
+ nonce?: string;
2438
+ /** whether this message is pinned */
2439
+ pinned: boolean;
2440
+ /** if the message is generated by a webhook, this is the webhook's id */
2441
+ webhook_id?: Snowflake;
2442
+ /** type of message */
2443
+ type: MessageType;
2444
+ /** sent with Rich Presence-related chat embeds */
2445
+ activity?: MessageActivity;
2446
+ /** sent with Rich Presence-related chat embeds */
2447
+ application?: Application;
2448
+ /** if the message is an Interaction or application-owned webhook, this is the id of the application */
2449
+ application_id?: Snowflake;
2450
+ /** data showing the source of a crosspost, channel follow add, pin, or reply message */
2451
+ message_reference?: MessageReference;
2452
+ /** message flags combined as a bitfield */
2453
+ flags?: number;
2454
+ /** the message associated with the message_reference */
2455
+ referenced_message?: Message | null;
2456
+ /** sent if the message is a response to an Interaction */
2457
+ interaction?: MessageInteraction;
2458
+ /** the thread that was started from this message, includes thread member object */
2459
+ thread?: Channel;
2460
+ /** sent if the message contains components like buttons, action rows, or other interactive components */
2461
+ components?: Component[];
2462
+ /** sent if the message contains stickers */
2463
+ sticker_items?: StickerItem[];
2464
+ /** Deprecated the stickers sent with the message */
2465
+ stickers?: Sticker[];
2466
+ }
2467
+ export interface MessageActivity {
2468
+ /** type of message activity */
2469
+ type: MessageActivityType;
2470
+ /** party_id from a Rich Presence event */
2471
+ party_id?: string;
2472
+ }
2473
+ export declare enum MessageActivityType {
2474
+ JOIN = 1,
2475
+ SPECTATE = 2,
2476
+ LISTEN = 3,
2477
+ JOIN_REQUEST = 5
2478
+ }
2479
+ export declare type MessageCreateEvent = Message;
2480
+ export interface MessageDeleteBulkEvent {
2481
+ /** the ids of the messages */
2482
+ ids: Snowflake[];
2483
+ /** the id of the channel */
2484
+ channel_id: Snowflake;
2485
+ /** the id of the guild */
2486
+ guild_id?: Snowflake;
2487
+ }
2488
+ export interface MessageDeleteEvent {
2489
+ /** the id of the message */
2490
+ id: Snowflake;
2491
+ /** the id of the channel */
2492
+ channel_id: Snowflake;
2493
+ /** the id of the guild */
2494
+ guild_id?: Snowflake;
2495
+ }
2496
+ export declare const MessageFlag: {
2497
+ /** this message has been published to subscribed channels (via Channel Following) */
2498
+ readonly CROSSPOSTED: number;
2499
+ /** this message originated from a message in another channel (via Channel Following) */
2500
+ readonly IS_CROSSPOST: number;
2501
+ /** do not include any embeds when serializing this message */
2502
+ readonly SUPPRESS_EMBEDS: number;
2503
+ /** the source message for this crosspost has been deleted (via Channel Following) */
2504
+ readonly SOURCE_MESSAGE_DELETED: number;
2505
+ /** this message came from the urgent message system */
2506
+ readonly URGENT: number;
2507
+ /** this message has an associated thread, with the same id as the message */
2508
+ readonly HAS_THREAD: number;
2509
+ /** this message is only visible to the user who invoked the Interaction */
2510
+ readonly EPHEMERAL: number;
2511
+ /** this message is an Interaction Response and the bot is "thinking" */
2512
+ readonly LOADING: number;
2513
+ /** this message failed to mention some roles and add their members to the thread */
2514
+ readonly FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: number;
2515
+ };
2516
+ export interface MessageInteraction {
2517
+ /** id of the interaction */
2518
+ id: Snowflake;
2519
+ /** the type of interaction */
2520
+ type: InteractionType;
2521
+ /** the name of the application command */
2522
+ name: string;
2523
+ /** the user who invoked the interaction */
2524
+ user: User;
2525
+ /** the member who invoked the interaction in the guild */
2526
+ member?: GuildMember;
2527
+ }
2528
+ export interface MessageReactionAddEvent {
2529
+ /** the id of the user */
2530
+ user_id: Snowflake;
2531
+ /** the id of the channel */
2532
+ channel_id: Snowflake;
2533
+ /** the id of the message */
2534
+ message_id: Snowflake;
2535
+ /** the id of the guild */
2536
+ guild_id?: Snowflake;
2537
+ /** the member who reacted if this happened in a guild */
2538
+ member?: GuildMember;
2539
+ /** the emoji used to react - example */
2540
+ emoji: Emoji;
2541
+ }
2542
+ export interface MessageReactionRemoveAllEvent {
2543
+ /** the id of the channel */
2544
+ channel_id: Snowflake;
2545
+ /** the id of the message */
2546
+ message_id: Snowflake;
2547
+ /** the id of the guild */
2548
+ guild_id?: Snowflake;
2549
+ }
2550
+ export interface MessageReactionRemoveEmojiEvent {
2551
+ /** the id of the channel */
2552
+ channel_id: Snowflake;
2553
+ /** the id of the guild */
2554
+ guild_id?: Snowflake;
2555
+ /** the id of the message */
2556
+ message_id: Snowflake;
2557
+ /** the emoji that was removed */
2558
+ emoji: Emoji;
2559
+ }
2560
+ export interface MessageReactionRemoveEvent {
2561
+ /** the id of the user */
2562
+ user_id: Snowflake;
2563
+ /** the id of the channel */
2564
+ channel_id: Snowflake;
2565
+ /** the id of the message */
2566
+ message_id: Snowflake;
2567
+ /** the id of the guild */
2568
+ guild_id?: Snowflake;
2569
+ /** the emoji used to react - example */
2570
+ emoji: Emoji;
2571
+ }
2572
+ export interface MessageReference {
2573
+ /** id of the originating message */
2574
+ message_id?: Snowflake;
2575
+ /** id of the originating message's channel */
2576
+ channel_id?: Snowflake;
2577
+ /** id of the originating message's guild */
2578
+ guild_id?: Snowflake;
2579
+ /** when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true */
2580
+ fail_if_not_exists?: boolean;
2581
+ }
2582
+ export declare enum MessageType {
2583
+ DEFAULT = 0,
2584
+ RECIPIENT_ADD = 1,
2585
+ RECIPIENT_REMOVE = 2,
2586
+ CALL = 3,
2587
+ CHANNEL_NAME_CHANGE = 4,
2588
+ CHANNEL_ICON_CHANGE = 5,
2589
+ CHANNEL_PINNED_MESSAGE = 6,
2590
+ GUILD_MEMBER_JOIN = 7,
2591
+ USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
2592
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
2593
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
2594
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
2595
+ CHANNEL_FOLLOW_ADD = 12,
2596
+ GUILD_DISCOVERY_DISQUALIFIED = 14,
2597
+ GUILD_DISCOVERY_REQUALIFIED = 15,
2598
+ GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING = 16,
2599
+ GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING = 17,
2600
+ THREAD_CREATED = 18,
2601
+ REPLY = 19,
2602
+ CHAT_INPUT_COMMAND = 20,
2603
+ THREAD_STARTER_MESSAGE = 21,
2604
+ GUILD_INVITE_REMINDER = 22,
2605
+ CONTEXT_MENU_COMMAND = 23
2606
+ }
2607
+ export declare type MessageUpdateEvent = Message;
2608
+ export declare enum MfaLevel {
2609
+ /** guild has no MFA/2FA requirement for moderation actions */
2610
+ NONE = 0,
2611
+ /** guild has a 2FA requirement for moderation actions */
2612
+ ELEVATED = 1
2613
+ }
2614
+ export interface ModifyChannelGroupDmParams {
2615
+ /** 1-100 character channel name */
2616
+ name: string;
2617
+ /** base64 encoded icon */
2618
+ icon: string;
2619
+ }
2620
+ export interface ModifyChannelGuildChannelParams {
2621
+ /** 1-100 character channel name */
2622
+ name: string;
2623
+ /** the type of channel; only conversion between text and news is supported and only in guilds with the "NEWS" feature */
2624
+ type: ChannelType;
2625
+ /** the position of the channel in the left-hand listing */
2626
+ position?: number | null;
2627
+ /** 0-1024 character channel topic */
2628
+ topic?: string | null;
2629
+ /** whether the channel is nsfw */
2630
+ nsfw?: boolean | null;
2631
+ /** 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 */
2632
+ rate_limit_per_user?: number | null;
2633
+ /** the bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) */
2634
+ bitrate?: number | null;
2635
+ /** the user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit */
2636
+ user_limit?: number | null;
2637
+ /** channel or category-specific permissions */
2638
+ permission_overwrites?: Overwrite[] | null;
2639
+ /** id of the new parent category for a channel */
2640
+ parent_id?: Snowflake | null;
2641
+ /** channel voice region id, automatic when set to null */
2642
+ rtc_region?: string | null;
2643
+ /** the camera video quality mode of the voice channel */
2644
+ video_quality_mode?: VideoQualityMode | null;
2645
+ /** the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity */
2646
+ default_auto_archive_duration?: number | null;
2647
+ }
2648
+ export declare type ModifyChannelParams = ModifyChannelGroupDmParams | ModifyChannelGuildChannelParams | ModifyChannelThreadParams;
2649
+ export interface ModifyChannelThreadParams {
2650
+ /** 1-100 character channel name */
2651
+ name: string;
2652
+ /** whether the thread is archived */
2653
+ archived: boolean;
2654
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
2655
+ auto_archive_duration: number;
2656
+ /** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
2657
+ locked: boolean;
2658
+ /** whether non-moderators can add other non-moderators to a thread; only available on private threads */
2659
+ invitable: boolean;
2660
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages, manage_thread, or manage_channel, are unaffected */
2661
+ rate_limit_per_user?: number | null;
2662
+ }
2663
+ export interface ModifyCurrentMemberParams {
2664
+ /** value to set user's nickname to */
2665
+ nick?: string | null;
2666
+ }
2667
+ export interface ModifyCurrentUserNickParams {
2668
+ /** value to set user's nickname to */
2669
+ nick?: string | null;
2670
+ }
2671
+ export interface ModifyCurrentUserParams {
2672
+ /** user's username, if changed may cause the user's discriminator to be randomized. */
2673
+ username: string;
2674
+ /** if passed, modifies the user's avatar */
2675
+ avatar?: string | null;
2676
+ }
2677
+ export interface ModifyCurrentUserVoiceStateParams {
2678
+ /** the id of the channel the user is currently in */
2679
+ channel_id: Snowflake;
2680
+ /** toggles the user's suppress state */
2681
+ suppress?: boolean;
2682
+ /** sets the user's request to speak */
2683
+ request_to_speak_timestamp?: string | null;
2684
+ }
2685
+ export interface ModifyGuildChannelPositionParams {
2686
+ /** channel id */
2687
+ id: Snowflake;
2688
+ /** sorting position of the channel */
2689
+ position?: number | null;
2690
+ /** syncs the permission overwrites with the new parent, if moving to a new category */
2691
+ lock_permissions?: boolean | null;
2692
+ /** the new parent ID for the channel that is moved */
2693
+ parent_id?: Snowflake | null;
2694
+ }
2695
+ export interface ModifyGuildEmojiParams {
2696
+ /** name of the emoji */
2697
+ name: string;
2698
+ /** roles allowed to use this emoji */
2699
+ roles?: Snowflake[] | null;
2700
+ }
2701
+ export interface ModifyGuildMemberParams {
2702
+ /** value to set user's nickname to */
2703
+ nick: string;
2704
+ /** array of role ids the member is assigned */
2705
+ roles: Snowflake[];
2706
+ /** whether the user is muted in voice channels. Will throw a 400 error if the user is not in a voice channel */
2707
+ mute: boolean;
2708
+ /** whether the user is deafened in voice channels. Will throw a 400 error if the user is not in a voice channel */
2709
+ deaf: boolean;
2710
+ /** id of channel to move user to (if they are connected to voice) */
2711
+ channel_id: Snowflake;
2712
+ /** when the user's timeout 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 */
2713
+ communication_disabled_until?: string | null;
2714
+ }
2715
+ export interface ModifyGuildParams {
2716
+ /** guild name */
2717
+ name: string;
2718
+ /** guild voice region id (deprecated) */
2719
+ region?: string | null;
2720
+ /** verification level */
2721
+ verification_level?: VerificationLevel | null;
2722
+ /** default message notification level */
2723
+ default_message_notifications?: DefaultMessageNotificationLevel | null;
2724
+ /** explicit content filter level */
2725
+ explicit_content_filter?: ExplicitContentFilterLevel | null;
2726
+ /** id for afk channel */
2727
+ afk_channel_id?: Snowflake | null;
2728
+ /** afk timeout in seconds */
2729
+ afk_timeout: number;
2730
+ /** base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the ANIMATED_ICON feature) */
2731
+ icon?: string | null;
2732
+ /** user id to transfer guild ownership to (must be owner) */
2733
+ owner_id: Snowflake;
2734
+ /** base64 16:9 png/jpeg image for the guild splash (when the server has the INVITE_SPLASH feature) */
2735
+ splash?: string | null;
2736
+ /** base64 16:9 png/jpeg image for the guild discovery splash (when the server has the DISCOVERABLE feature) */
2737
+ discovery_splash?: string | null;
2738
+ /** base64 16:9 png/jpeg image for the guild banner (when the server has the BANNER feature) */
2739
+ banner?: string | null;
2740
+ /** the id of the channel where guild notices such as welcome messages and boost events are posted */
2741
+ system_channel_id?: Snowflake | null;
2742
+ /** system channel flags */
2743
+ system_channel_flags: number;
2744
+ /** the id of the channel where Community guilds display rules and/or guidelines */
2745
+ rules_channel_id?: Snowflake | null;
2746
+ /** the id of the channel where admins and moderators of Community guilds receive notices from Discord */
2747
+ public_updates_channel_id?: Snowflake | null;
2748
+ /** the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US" */
2749
+ preferred_locale?: string | null;
2750
+ /** enabled guild features */
2751
+ features: GuildFeature[];
2752
+ /** the description for the guild, if the guild is discoverable */
2753
+ description?: string | null;
2754
+ /** whether the guild's boost progress bar should be enabled. */
2755
+ premium_progress_bar_enabled: boolean;
2756
+ }
2757
+ export interface ModifyGuildRoleParams {
2758
+ /** name of the role */
2759
+ name: string;
2760
+ /** bitwise value of the enabled/disabled permissions */
2761
+ permissions: string;
2762
+ /** RGB color value */
2763
+ color: number;
2764
+ /** whether the role should be displayed separately in the sidebar */
2765
+ hoist: boolean;
2766
+ /** the role's icon image (if the guild has the ROLE_ICONS feature) */
2767
+ icon: string;
2768
+ /** the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature) */
2769
+ unicode_emoji: string;
2770
+ /** whether the role should be mentionable */
2771
+ mentionable: boolean;
2772
+ }
2773
+ export interface ModifyGuildRolePositionParams {
2774
+ /** role */
2775
+ id: Snowflake;
2776
+ /** sorting position of the role */
2777
+ position?: number | null;
2778
+ }
2779
+ export interface ModifyGuildScheduledEventParams {
2780
+ /** the channel id of the scheduled event, set to null if changing entity type to EXTERNAL */
2781
+ channel_id?: Snowflake | null;
2782
+ /** the entity metadata of the scheduled event */
2783
+ entity_metadata?: GuildScheduledEventEntityMetadatum | null;
2784
+ /** the name of the scheduled event */
2785
+ name?: string;
2786
+ /** the privacy level of the scheduled event */
2787
+ privacy_level?: GuildScheduledEventPrivacyLevel;
2788
+ /** the time to schedule the scheduled event */
2789
+ scheduled_start_time?: string;
2790
+ /** the time when the scheduled event is scheduled to end */
2791
+ scheduled_end_time?: string;
2792
+ /** the description of the scheduled event */
2793
+ description?: string | null;
2794
+ /** the entity type of the scheduled event */
2795
+ entity_type?: GuildScheduledEventEntityType;
2796
+ /** the status of the scheduled event */
2797
+ status?: GuildScheduledEventStatus;
2798
+ /** the cover image of the scheduled event */
2799
+ image?: string;
2800
+ }
2801
+ export interface ModifyGuildStickerParams {
2802
+ /** name of the sticker (2-30 characters) */
2803
+ name: string;
2804
+ /** description of the sticker (2-100 characters) */
2805
+ description?: string | null;
2806
+ /** autocomplete/suggestion tags for the sticker (max 200 characters) */
2807
+ tags: string;
2808
+ }
2809
+ export interface ModifyGuildTemplateParams {
2810
+ /** name of the template (1-100 characters) */
2811
+ name?: string;
2812
+ /** description for the template (0-120 characters) */
2813
+ description?: string | null;
2814
+ }
2815
+ export interface ModifyGuildWelcomeScreenParams {
2816
+ /** whether the welcome screen is enabled */
2817
+ enabled: boolean;
2818
+ /** channels linked in the welcome screen and their display options */
2819
+ welcome_channels: WelcomeScreenChannel[];
2820
+ /** the server description to show in the welcome screen */
2821
+ description: string;
2822
+ }
2823
+ export interface ModifyStageInstanceParams {
2824
+ /** The topic of the Stage instance (1-120 characters) */
2825
+ topic?: string;
2826
+ /** The privacy level of the Stage instance */
2827
+ privacy_level?: PrivacyLevel;
2828
+ }
2829
+ export interface ModifyUserVoiceStateParams {
2830
+ /** the id of the channel the user is currently in */
2831
+ channel_id: Snowflake;
2832
+ /** toggles the user's suppress state */
2833
+ suppress?: boolean;
2834
+ }
2835
+ export interface ModifyWebhookParams {
2836
+ /** the default name of the webhook */
2837
+ name: string;
2838
+ /** image for the default webhook avatar */
2839
+ avatar?: string | null;
2840
+ /** the new channel id this webhook should be moved to */
2841
+ channel_id: Snowflake;
2842
+ }
2843
+ export interface Overwrite {
2844
+ /** role or user id */
2845
+ id: Snowflake;
2846
+ /** either 0 (role) or 1 (member) */
2847
+ type: number;
2848
+ /** permission bit set */
2849
+ allow: string;
2850
+ /** permission bit set */
2851
+ deny: string;
2852
+ }
2853
+ export declare const PermissionFlag: {
2854
+ /** Allows creation of instant invites */
2855
+ readonly CREATE_INSTANT_INVITE: bigint;
2856
+ /** Allows kicking members */
2857
+ readonly KICK_MEMBERS: bigint;
2858
+ /** Allows banning members */
2859
+ readonly BAN_MEMBERS: bigint;
2860
+ /** Allows all permissions and bypasses channel permission overwrites */
2861
+ readonly ADMINISTRATOR: bigint;
2862
+ /** Allows management and editing of channels */
2863
+ readonly MANAGE_CHANNELS: bigint;
2864
+ /** Allows management and editing of the guild */
2865
+ readonly MANAGE_GUILD: bigint;
2866
+ /** Allows for the addition of reactions to messages */
2867
+ readonly ADD_REACTIONS: bigint;
2868
+ /** Allows for viewing of audit logs */
2869
+ readonly VIEW_AUDIT_LOG: bigint;
2870
+ /** Allows for using priority speaker in a voice channel */
2871
+ readonly PRIORITY_SPEAKER: bigint;
2872
+ /** Allows the user to go live */
2873
+ readonly STREAM: bigint;
2874
+ /** Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels */
2875
+ readonly VIEW_CHANNEL: bigint;
2876
+ /** Allows for sending messages in a channel (does not allow sending messages in threads) */
2877
+ readonly SEND_MESSAGES: bigint;
2878
+ /** Allows for sending of /tts messages */
2879
+ readonly SEND_TTS_MESSAGES: bigint;
2880
+ /** Allows for deletion of other users messages */
2881
+ readonly MANAGE_MESSAGES: bigint;
2882
+ /** Links sent by users with this permission will be auto-embedded */
2883
+ readonly EMBED_LINKS: bigint;
2884
+ /** Allows for uploading images and files */
2885
+ readonly ATTACH_FILES: bigint;
2886
+ /** Allows for reading of message history */
2887
+ readonly READ_MESSAGE_HISTORY: bigint;
2888
+ /** Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel */
2889
+ readonly MENTION_EVERYONE: bigint;
2890
+ /** Allows the usage of custom emojis from other servers */
2891
+ readonly USE_EXTERNAL_EMOJIS: bigint;
2892
+ /** Allows for viewing guild insights */
2893
+ readonly VIEW_GUILD_INSIGHTS: bigint;
2894
+ /** Allows for joining of a voice channel */
2895
+ readonly CONNECT: bigint;
2896
+ /** Allows for speaking in a voice channel */
2897
+ readonly SPEAK: bigint;
2898
+ /** Allows for muting members in a voice channel */
2899
+ readonly MUTE_MEMBERS: bigint;
2900
+ /** Allows for deafening of members in a voice channel */
2901
+ readonly DEAFEN_MEMBERS: bigint;
2902
+ /** Allows for moving of members between voice channels */
2903
+ readonly MOVE_MEMBERS: bigint;
2904
+ /** Allows for using voice-activity-detection in a voice channel */
2905
+ readonly USE_VAD: bigint;
2906
+ /** Allows for modification of own nickname */
2907
+ readonly CHANGE_NICKNAME: bigint;
2908
+ /** Allows for modification of other users nicknames */
2909
+ readonly MANAGE_NICKNAMES: bigint;
2910
+ /** Allows management and editing of roles */
2911
+ readonly MANAGE_ROLES: bigint;
2912
+ /** Allows management and editing of webhooks */
2913
+ readonly MANAGE_WEBHOOKS: bigint;
2914
+ /** Allows management and editing of emojis and stickers */
2915
+ readonly MANAGE_EMOJIS_AND_STICKERS: bigint;
2916
+ /** Allows members to use application commands, including slash commands and context menu commands. */
2917
+ readonly USE_APPLICATION_COMMANDS: bigint;
2918
+ /** Allows for requesting to speak in stage channels. (This permission is under active development and may be changed or removed.) */
2919
+ readonly REQUEST_TO_SPEAK: bigint;
2920
+ /** Allows for creating, editing, and deleting scheduled events */
2921
+ readonly MANAGE_EVENTS: bigint;
2922
+ /** Allows for deleting and archiving threads, and viewing all private threads */
2923
+ readonly MANAGE_THREADS: bigint;
2924
+ /** Allows for creating public and announcement threads */
2925
+ readonly CREATE_PUBLIC_THREADS: bigint;
2926
+ /** Allows for creating private threads */
2927
+ readonly CREATE_PRIVATE_THREADS: bigint;
2928
+ /** Allows the usage of custom stickers from other servers */
2929
+ readonly USE_EXTERNAL_STICKERS: bigint;
2930
+ /** Allows for sending messages in threads */
2931
+ readonly SEND_MESSAGES_IN_THREADS: bigint;
2932
+ /** Allows for using Activities (applications with the EMBEDDED flag) in a voice channel */
2933
+ readonly USE_EMBEDDED_ACTIVITIES: bigint;
2934
+ /** Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels */
2935
+ readonly MODERATE_MEMBERS: bigint;
2936
+ };
2937
+ export declare enum PremiumTier {
2938
+ /** guild has not unlocked any Server Boost perks */
2939
+ NONE = 0,
2940
+ /** guild has unlocked Server Boost level 1 perks */
2941
+ TIER_1 = 1,
2942
+ /** guild has unlocked Server Boost level 2 perks */
2943
+ TIER_2 = 2,
2944
+ /** guild has unlocked Server Boost level 3 perks */
2945
+ TIER_3 = 3
2946
+ }
2947
+ export declare enum PremiumType {
2948
+ NONE = 0,
2949
+ NITRO_CLASSIC = 1,
2950
+ NITRO = 2
2951
+ }
2952
+ export interface PresenceUpdateEvent {
2953
+ /** the user presence is being updated for */
2954
+ user: User;
2955
+ /** id of the guild */
2956
+ guild_id: Snowflake;
2957
+ /** either "idle", "dnd", "online", or "offline" */
2958
+ status: string;
2959
+ /** user's current activities */
2960
+ activities: Activity[];
2961
+ /** user's platform-dependent status */
2962
+ client_status: ClientStatus;
2963
+ }
2964
+ export declare enum PrivacyLevel {
2965
+ /** The Stage instance is visible publicly. (deprecated) */
2966
+ PUBLIC = 1,
2967
+ /** The Stage instance is visible to only guild members. */
2968
+ GUILD_ONLY = 2
2969
+ }
2970
+ export interface Reaction {
2971
+ /** times this emoji has been used to react */
2972
+ count: number;
2973
+ /** whether the current user reacted using this emoji */
2974
+ me: boolean;
2975
+ /** emoji information */
2976
+ emoji: Emoji;
2977
+ }
2978
+ export interface ReadyEvent {
2979
+ /** gateway version */
2980
+ v: number;
2981
+ /** information about the user including email */
2982
+ user: User;
2983
+ /** the guilds the user is in */
2984
+ guilds: UnavailableGuild[];
2985
+ /** used for resuming connections */
2986
+ session_id: string;
2987
+ /** the shard information associated with this session, if sent when identifying */
2988
+ shard?: number[];
2989
+ /** contains id and flags */
2990
+ application: Application;
2991
+ }
2992
+ export declare type ReconnectEvent = null;
2993
+ export interface RequestGuildMember {
2994
+ /** id of the guild to get members for */
2995
+ guild_id: Snowflake;
2996
+ /** string that username starts with, or an empty string to return all members */
2997
+ query?: string;
2998
+ /** maximum number of members to send matching the query; a limit of 0 can be used with an empty string query to return all members */
2999
+ limit: number;
3000
+ /** used to specify if we want the presences of the matched members */
3001
+ presences?: boolean;
3002
+ /** used to specify which users you wish to fetch */
3003
+ user_ids?: Snowflake[];
3004
+ /** nonce to identify the Guild Members Chunk response */
3005
+ nonce?: string;
3006
+ }
3007
+ export interface ResolvedDatum {
3008
+ /** the ids and User objects */
3009
+ users?: Record<Snowflake, User>;
3010
+ /** the ids and partial Member objects */
3011
+ members?: Record<Snowflake, GuildMember>;
3012
+ /** the ids and Role objects */
3013
+ roles?: Record<Snowflake, Role>;
3014
+ /** the ids and partial Channel objects */
3015
+ channels?: Record<Snowflake, Channel>;
3016
+ /** the ids and partial Message objects */
3017
+ messages?: Record<Snowflake, Message>;
3018
+ /** the ids and attachment objects */
3019
+ attachments?: Record<Snowflake, Attachment>;
3020
+ }
3021
+ export interface ResponseBody {
3022
+ /** the active threads */
3023
+ threads: Channel[];
3024
+ /** a thread member object for each returned thread the current user has joined */
3025
+ members: ThreadMember[];
3026
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
3027
+ has_more: boolean;
3028
+ }
3029
+ export interface Resume {
3030
+ /** session token */
3031
+ token: string;
3032
+ /** session id */
3033
+ session_id: string;
3034
+ /** last sequence number received */
3035
+ seq: number;
3036
+ }
3037
+ export declare type ResumedEvent = null;
3038
+ export interface Role {
3039
+ /** role id */
3040
+ id: Snowflake;
3041
+ /** role name */
3042
+ name: string;
3043
+ /** integer representation of hexadecimal color code */
3044
+ color: number;
3045
+ /** if this role is pinned in the user listing */
3046
+ hoist: boolean;
3047
+ /** role icon hash */
3048
+ icon?: string | null;
3049
+ /** role unicode emoji */
3050
+ unicode_emoji?: string | null;
3051
+ /** position of this role */
3052
+ position: number;
3053
+ /** permission bit set */
3054
+ permissions: string;
3055
+ /** whether this role is managed by an integration */
3056
+ managed: boolean;
3057
+ /** whether this role is mentionable */
3058
+ mentionable: boolean;
3059
+ /** the tags this role has */
3060
+ tags?: RoleTag;
3061
+ }
3062
+ export interface RoleTag {
3063
+ /** the id of the bot this role belongs to */
3064
+ bot_id?: Snowflake;
3065
+ /** the id of the integration this role belongs to */
3066
+ integration_id?: Snowflake;
3067
+ /** whether this is the guild's premium subscriber role */
3068
+ premium_subscriber?: null;
3069
+ }
3070
+ export declare type Route<P, O> = {
3071
+ method: string;
3072
+ url: string;
3073
+ params?: P;
3074
+ options?: O;
3075
+ };
3076
+ export interface SearchGuildMemberParams {
3077
+ /** Query string to match username(s) and nickname(s) against. */
3078
+ query: string;
3079
+ /** max number of members to return (1-1000) */
3080
+ limit: number;
3081
+ }
3082
+ export interface SelectMenu {
3083
+ /** 3 for a select menu */
3084
+ type: number;
3085
+ /** a developer-defined identifier for the select menu, max 100 characters */
3086
+ custom_id: string;
3087
+ /** the choices in the select, max 25 */
3088
+ options: SelectOption[];
3089
+ /** custom placeholder text if nothing is selected, max 150 characters */
3090
+ placeholder?: string;
3091
+ /** the minimum number of items that must be chosen; default 1, min 0, max 25 */
3092
+ min_values?: number;
3093
+ /** the maximum number of items that can be chosen; default 1, max 25 */
3094
+ max_values?: number;
3095
+ /** disable the select, default false */
3096
+ disabled?: boolean;
3097
+ }
3098
+ export interface SelectOption {
3099
+ /** the user-facing name of the option, max 100 characters */
3100
+ label: string;
3101
+ /** the dev-define value of the option, max 100 characters */
3102
+ value: string;
3103
+ /** an additional description of the option, max 100 characters */
3104
+ description?: string;
3105
+ /** id, name, and animated */
3106
+ emoji?: Emoji;
3107
+ /** will render this option as selected by default */
3108
+ default?: boolean;
3109
+ }
3110
+ export interface SessionStartLimit {
3111
+ /** The total number of session starts the current user is allowed */
3112
+ total: number;
3113
+ /** The remaining number of session starts the current user is allowed */
3114
+ remaining: number;
3115
+ /** The number of milliseconds after which the limit resets */
3116
+ reset_after: number;
3117
+ /** The number of identify requests allowed per 5 seconds */
3118
+ max_concurrency: number;
3119
+ }
3120
+ export declare type Snowflake = `${bigint}`;
3121
+ export interface StageInstance {
3122
+ /** The id of this Stage instance */
3123
+ id: Snowflake;
3124
+ /** The guild id of the associated Stage channel */
3125
+ guild_id: Snowflake;
3126
+ /** The id of the associated Stage channel */
3127
+ channel_id: Snowflake;
3128
+ /** The topic of the Stage instance (1-120 characters) */
3129
+ topic: string;
3130
+ /** The privacy level of the Stage instance */
3131
+ privacy_level: PrivacyLevel;
3132
+ /** Whether or not Stage Discovery is disabled (deprecated) */
3133
+ discoverable_disabled: boolean;
3134
+ /** The id of the scheduled event for this Stage instance */
3135
+ guild_scheduled_event_id?: Snowflake | null;
3136
+ }
3137
+ export declare type StageInstanceCreateEvent = StageInstance;
3138
+ export declare type StageInstanceDeleteEvent = StageInstance;
3139
+ export declare type StageInstanceUpdateEvent = StageInstance;
3140
+ export interface StartThreadWithMessageParams {
3141
+ /** 1-100 character channel name */
3142
+ name: string;
3143
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
3144
+ auto_archive_duration?: number;
3145
+ /** amount of seconds a user has to wait before sending another message (0-21600) */
3146
+ rate_limit_per_user?: number | null;
3147
+ }
3148
+ export interface StartThreadWithoutMessageParams {
3149
+ /** 1-100 character channel name */
3150
+ name: string;
3151
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
3152
+ auto_archive_duration?: number;
3153
+ /** the type of thread to create */
3154
+ type?: ChannelType;
3155
+ /** whether non-moderators can add other non-moderators to a thread; only available when creating a private thread */
3156
+ invitable?: boolean;
3157
+ /** amount of seconds a user has to wait before sending another message (0-21600) */
3158
+ rate_limit_per_user?: number | null;
3159
+ }
3160
+ export declare enum StatusType {
3161
+ /** Online */
3162
+ ONLINE = "online",
3163
+ /** Do Not Disturb */
3164
+ DND = "dnd",
3165
+ /** AFK */
3166
+ IDLE = "idle",
3167
+ /** Invisible and shown as offline */
3168
+ INVISIBLE = "invisible",
3169
+ /** Offline */
3170
+ OFFLINE = "offline"
3171
+ }
3172
+ export interface Sticker {
3173
+ /** id of the sticker */
3174
+ id: Snowflake;
3175
+ /** for standard stickers, id of the pack the sticker is from */
3176
+ pack_id?: Snowflake;
3177
+ /** name of the sticker */
3178
+ name: string;
3179
+ /** description of the sticker */
3180
+ description?: string | null;
3181
+ /** autocomplete/suggestion tags for the sticker (max 200 characters) */
3182
+ tags: string;
3183
+ /** Deprecated previously the sticker asset hash, now an empty string */
3184
+ asset?: string;
3185
+ /** type of sticker */
3186
+ type: StickerType;
3187
+ /** type of sticker format */
3188
+ format_type: StickerFormatType;
3189
+ /** whether this guild sticker can be used, may be false due to loss of Server Boosts */
3190
+ available?: boolean;
3191
+ /** id of the guild that owns this sticker */
3192
+ guild_id?: Snowflake;
3193
+ /** the user that uploaded the guild sticker */
3194
+ user?: User;
3195
+ /** the standard sticker's sort order within its pack */
3196
+ sort_value?: number;
3197
+ }
3198
+ export declare enum StickerFormatType {
3199
+ PNG = 1,
3200
+ APNG = 2,
3201
+ LOTTIE = 3
3202
+ }
3203
+ export interface StickerItem {
3204
+ /** id of the sticker */
3205
+ id: Snowflake;
3206
+ /** name of the sticker */
3207
+ name: string;
3208
+ /** type of sticker format */
3209
+ format_type: StickerFormatType;
3210
+ }
3211
+ export interface StickerPack {
3212
+ /** id of the sticker pack */
3213
+ id: Snowflake;
3214
+ /** the stickers in the pack */
3215
+ stickers: Sticker[];
3216
+ /** name of the sticker pack */
3217
+ name: string;
3218
+ /** id of the pack's SKU */
3219
+ sku_id: Snowflake;
3220
+ /** id of a sticker in the pack which is shown as the pack's icon */
3221
+ cover_sticker_id?: Snowflake;
3222
+ /** description of the sticker pack */
3223
+ description: string;
3224
+ /** id of the sticker pack's banner image */
3225
+ banner_asset_id?: Snowflake;
3226
+ }
3227
+ export declare enum StickerType {
3228
+ /** an official sticker in a pack, part of Nitro or in a removed purchasable pack */
3229
+ STANDARD = 1,
3230
+ /** a sticker uploaded to a Boosted guild for the guild's members */
3231
+ GUILD = 2
3232
+ }
3233
+ export declare const SystemChannelFlag: {
3234
+ /** Suppress member join notifications */
3235
+ readonly SUPPRESS_JOIN_NOTIFICATIONS: number;
3236
+ /** Suppress server boost notifications */
3237
+ readonly SUPPRESS_PREMIUM_SUBSCRIPTIONS: number;
3238
+ /** Suppress server setup tips */
3239
+ readonly SUPPRESS_GUILD_REMINDER_NOTIFICATIONS: number;
3240
+ /** Hide member join sticker reply buttons */
3241
+ readonly SUPPRESS_JOIN_NOTIFICATION_REPLIES: number;
3242
+ };
3243
+ export interface Team {
3244
+ /** a hash of the image of the team's icon */
3245
+ icon?: string | null;
3246
+ /** the unique id of the team */
3247
+ id: Snowflake;
3248
+ /** the members of the team */
3249
+ members: TeamMember[];
3250
+ /** the name of the team */
3251
+ name: string;
3252
+ /** the user id of the current team owner */
3253
+ owner_user_id: Snowflake;
3254
+ }
3255
+ export interface TeamMember {
3256
+ /** the user's membership state on the team */
3257
+ membership_state: MembershipState;
3258
+ /** will always be ["*"] */
3259
+ permissions: string[];
3260
+ /** the id of the parent team of which they are a member */
3261
+ team_id: Snowflake;
3262
+ /** the avatar, discriminator, id, and username of the user */
3263
+ user: User;
3264
+ }
3265
+ export interface TextInput {
3266
+ /** 4 for a text input */
3267
+ type: number;
3268
+ /** a developer-defined identifier for the input, max 100 characters */
3269
+ custom_id: string;
3270
+ /** the Text Input Style */
3271
+ style: TextInputStyle;
3272
+ /** the label for this component */
3273
+ label: string;
3274
+ /** the minimum input length for a text input, min 0, max 4000 */
3275
+ min_length?: number;
3276
+ /** the maximum input length for a text input, min 1, max 4000 */
3277
+ max_length?: number;
3278
+ /** whether this component is required to be filled, default true */
3279
+ required?: boolean;
3280
+ /** a pre-filled value for this component, max 4000 characters */
3281
+ value?: string;
3282
+ /** custom placeholder text if the input is empty, max 100 characters */
3283
+ placeholder?: string;
3284
+ }
3285
+ export declare enum TextInputStyle {
3286
+ /** A single-line input */
3287
+ SHORT = 1,
3288
+ /** A multi-line input */
3289
+ PARAGRAPH = 2
3290
+ }
3291
+ export declare type ThreadCreateEvent = Channel;
3292
+ export declare type ThreadDeleteEvent = Channel;
3293
+ export interface ThreadListSyncEvent {
3294
+ /** the id of the guild */
3295
+ guild_id: Snowflake;
3296
+ /** the parent channel ids whose threads are being synced. If omitted, then threads were synced for the entire guild. This array may contain channel_ids that have no active threads as well, so you know to clear that data. */
3297
+ channel_ids?: Snowflake[];
3298
+ /** all active threads in the given channels that the current user can access */
3299
+ threads: Channel[];
3300
+ /** all thread member objects from the synced threads for the current user, indicating which threads the current user has been added to */
3301
+ members: ThreadMember[];
3302
+ }
3303
+ export interface ThreadMember {
3304
+ /** the id of the thread */
3305
+ id?: Snowflake;
3306
+ /** the id of the user */
3307
+ user_id?: Snowflake;
3308
+ /** the time the current user last joined the thread */
3309
+ join_timestamp: string;
3310
+ /** any user-thread settings, currently only used for notifications */
3311
+ flags: number;
3312
+ }
3313
+ export interface ThreadMembersUpdateEvent {
3314
+ /** the id of the thread */
3315
+ id: Snowflake;
3316
+ /** the id of the guild */
3317
+ guild_id: Snowflake;
3318
+ /** the approximate number of members in the thread, capped at 50 */
3319
+ member_count: number;
3320
+ /** the users who were added to the thread */
3321
+ added_members?: ThreadMember[];
3322
+ /** the id of the users who were removed from the thread */
3323
+ removed_member_ids?: Snowflake[];
3324
+ }
3325
+ export declare type ThreadMemberUpdateEvent = ThreadMember;
3326
+ export interface ThreadMemberUpdateEventExtra {
3327
+ /** the id of the guild */
3328
+ guild_id: Snowflake;
3329
+ }
3330
+ export interface ThreadMetadatum {
3331
+ /** whether the thread is archived */
3332
+ archived: boolean;
3333
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
3334
+ auto_archive_duration: number;
3335
+ /** timestamp when the thread's archive status was last changed, used for calculating recent activity */
3336
+ archive_timestamp: string;
3337
+ /** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
3338
+ locked: boolean;
3339
+ /** whether non-moderators can add other non-moderators to a thread; only available on private threads */
3340
+ invitable?: boolean;
3341
+ /** timestamp when the thread was created; only populated for threads created after 2022-01-09 */
3342
+ create_timestamp?: string | null;
3343
+ }
3344
+ export declare type ThreadUpdateEvent = Channel;
3345
+ export interface TypingStartEvent {
3346
+ /** id of the channel */
3347
+ channel_id: Snowflake;
3348
+ /** id of the guild */
3349
+ guild_id?: Snowflake;
3350
+ /** id of the user */
3351
+ user_id: Snowflake;
3352
+ /** unix time (in seconds) of when the user started typing */
3353
+ timestamp: number;
3354
+ /** the member who started typing if this happened in a guild */
3355
+ member?: GuildMember;
3356
+ }
3357
+ export interface UnavailableGuild {
3358
+ /** */
3359
+ id: Snowflake;
3360
+ /** */
3361
+ unavailable: boolean;
3362
+ }
3363
+ export interface UpdatePresence {
3364
+ /** unix time (in milliseconds) of when the client went idle, or null if the client is not idle */
3365
+ since?: number | null;
3366
+ /** the user's activities */
3367
+ activities: Activity[];
3368
+ /** the user's new status */
3369
+ status: StatusType;
3370
+ /** whether or not the client is afk */
3371
+ afk: boolean;
3372
+ }
3373
+ export interface UpdateVoiceState {
3374
+ /** id of the guild */
3375
+ guild_id: Snowflake;
3376
+ /** id of the voice channel client wants to join (null if disconnecting) */
3377
+ channel_id?: Snowflake | null;
3378
+ /** is the client muted */
3379
+ self_mute: boolean;
3380
+ /** is the client deafened */
3381
+ self_deaf: boolean;
3382
+ }
3383
+ export interface User {
3384
+ /** the user's id */
3385
+ id: Snowflake;
3386
+ /** the user's username, not unique across the platform */
3387
+ username: string;
3388
+ /** the user's 4-digit discord-tag */
3389
+ discriminator: string;
3390
+ /** the user's avatar hash */
3391
+ avatar?: string | null;
3392
+ /** whether the user belongs to an OAuth2 application */
3393
+ bot?: boolean;
3394
+ /** whether the user is an Official Discord System user (part of the urgent message system) */
3395
+ system?: boolean;
3396
+ /** whether the user has two factor enabled on their account */
3397
+ mfa_enabled?: boolean;
3398
+ /** the user's banner hash */
3399
+ banner?: string | null;
3400
+ /** the user's banner color encoded as an integer representation of hexadecimal color code */
3401
+ accent_color?: number | null;
3402
+ /** the user's chosen language option */
3403
+ locale?: string;
3404
+ /** whether the email on this account has been verified */
3405
+ verified?: boolean;
3406
+ /** the user's email */
3407
+ email?: string | null;
3408
+ /** the flags on a user's account */
3409
+ flags?: number;
3410
+ /** the type of Nitro subscription on a user's account */
3411
+ premium_type?: PremiumType;
3412
+ /** the public flags on a user's account */
3413
+ public_flags?: number;
3414
+ }
3415
+ export declare const UserFlag: {
3416
+ /** Discord Employee */
3417
+ readonly STAFF: number;
3418
+ /** Partnered Server Owner */
3419
+ readonly PARTNER: number;
3420
+ /** HypeSquad Events Coordinator */
3421
+ readonly HYPESQUAD: number;
3422
+ /** Bug Hunter Level 1 */
3423
+ readonly BUG_HUNTER_LEVEL_1: number;
3424
+ /** House Bravery Member */
3425
+ readonly HYPESQUAD_ONLINE_HOUSE_1: number;
3426
+ /** House Brilliance Member */
3427
+ readonly HYPESQUAD_ONLINE_HOUSE_2: number;
3428
+ /** House Balance Member */
3429
+ readonly HYPESQUAD_ONLINE_HOUSE_3: number;
3430
+ /** Early Nitro Supporter */
3431
+ readonly PREMIUM_EARLY_SUPPORTER: number;
3432
+ /** User is a team */
3433
+ readonly TEAM_PSEUDO_USER: number;
3434
+ /** Bug Hunter Level 2 */
3435
+ readonly BUG_HUNTER_LEVEL_2: number;
3436
+ /** Verified Bot */
3437
+ readonly VERIFIED_BOT: number;
3438
+ /** Early Verified Bot Developer */
3439
+ readonly VERIFIED_DEVELOPER: number;
3440
+ /** Discord Certified Moderator */
3441
+ readonly CERTIFIED_MODERATOR: number;
3442
+ /** Bot uses only HTTP interactions and is shown in the online member list */
3443
+ readonly BOT_HTTP_INTERACTIONS: number;
3444
+ };
3445
+ export declare type UserUpdateEvent = User;
3446
+ export declare enum VerificationLevel {
3447
+ /** unrestricted */
3448
+ NONE = 0,
3449
+ /** must have verified email on account */
3450
+ LOW = 1,
3451
+ /** must be registered on Discord for longer than 5 minutes */
3452
+ MEDIUM = 2,
3453
+ /** must be a member of the server for longer than 10 minutes */
3454
+ HIGH = 3,
3455
+ /** must have a verified phone number */
3456
+ VERY_HIGH = 4
3457
+ }
3458
+ export declare enum VideoQualityMode {
3459
+ /** Discord chooses the quality for optimal performance */
3460
+ AUTO = 1,
3461
+ /** 720p */
3462
+ FULL = 2
3463
+ }
3464
+ export declare enum VisibilityType {
3465
+ /** invisible to everyone except the user themselves */
3466
+ NONE = 0,
3467
+ /** visible to everyone */
3468
+ EVERYONE = 1
3469
+ }
3470
+ export declare enum VoiceOpcode {
3471
+ /** Begin a voice websocket connection. */
3472
+ IDENTIFY = 0,
3473
+ /** Select the voice protocol. */
3474
+ SELECT_PROTOCOL = 1,
3475
+ /** Complete the websocket handshake. */
3476
+ READY = 2,
3477
+ /** Keep the websocket connection alive. */
3478
+ HEARTBEAT = 3,
3479
+ /** Describe the session. */
3480
+ SESSION_DESCRIPTION = 4,
3481
+ /** Indicate which users are speaking. */
3482
+ SPEAKING = 5,
3483
+ /** Sent to acknowledge a received client heartbeat. */
3484
+ HEARTBEAT_ACK = 6,
3485
+ /** Resume a connection. */
3486
+ RESUME = 7,
3487
+ /** Time to wait between sending heartbeats in milliseconds. */
3488
+ HELLO = 8,
3489
+ /** Acknowledge a successful session resume. */
3490
+ RESUMED = 9,
3491
+ /** A client has disconnected from the voice channel */
3492
+ CLIENT_DISCONNECT = 13
3493
+ }
3494
+ export interface VoiceRegion {
3495
+ /** unique ID for the region */
3496
+ id: string;
3497
+ /** name of the region */
3498
+ name: string;
3499
+ /** true for a single server that is closest to the current user's client */
3500
+ optimal: boolean;
3501
+ /** whether this is a deprecated voice region (avoid switching to these) */
3502
+ deprecated: boolean;
3503
+ /** whether this is a custom voice region (used for events/etc) */
3504
+ custom: boolean;
3505
+ }
3506
+ export interface VoiceServerUpdateEvent {
3507
+ /** voice connection token */
3508
+ token: string;
3509
+ /** the guild this voice server update is for */
3510
+ guild_id: Snowflake;
3511
+ /** the voice server host */
3512
+ endpoint?: string | null;
3513
+ }
3514
+ export interface VoiceState {
3515
+ /** the guild id this voice state is for */
3516
+ guild_id?: Snowflake;
3517
+ /** the channel id this user is connected to */
3518
+ channel_id?: Snowflake | null;
3519
+ /** the user id this voice state is for */
3520
+ user_id: Snowflake;
3521
+ /** the guild member this voice state is for */
3522
+ member?: GuildMember;
3523
+ /** the session id for this voice state */
3524
+ session_id: string;
3525
+ /** whether this user is deafened by the server */
3526
+ deaf: boolean;
3527
+ /** whether this user is muted by the server */
3528
+ mute: boolean;
3529
+ /** whether this user is locally deafened */
3530
+ self_deaf: boolean;
3531
+ /** whether this user is locally muted */
3532
+ self_mute: boolean;
3533
+ /** whether this user is streaming using "Go Live" */
3534
+ self_stream?: boolean;
3535
+ /** whether this user's camera is enabled */
3536
+ self_video: boolean;
3537
+ /** whether this user is muted by the current user */
3538
+ suppress: boolean;
3539
+ /** the time at which the user requested to speak */
3540
+ request_to_speak_timestamp?: string | null;
3541
+ }
3542
+ export declare type VoiceStateUpdateEvent = VoiceState;
3543
+ export interface Webhook {
3544
+ /** the id of the webhook */
3545
+ id: Snowflake;
3546
+ /** the type of the webhook */
3547
+ type: WebhookType;
3548
+ /** the guild id this webhook is for, if any */
3549
+ guild_id?: Snowflake | null;
3550
+ /** the channel id this webhook is for, if any */
3551
+ channel_id?: Snowflake | null;
3552
+ /** the user this webhook was created by (not returned when getting a webhook with its token) */
3553
+ user?: User;
3554
+ /** the default name of the webhook */
3555
+ name?: string | null;
3556
+ /** the default user avatar hash of the webhook */
3557
+ avatar?: string | null;
3558
+ /** the secure token of the webhook (returned for Incoming Webhooks) */
3559
+ token?: string;
3560
+ /** the bot/OAuth2 application that created this webhook */
3561
+ application_id?: Snowflake | null;
3562
+ /** the guild of the channel that this webhook is following (returned for Channel Follower Webhooks) */
3563
+ source_guild?: Guild;
3564
+ /** the channel that this webhook is following (returned for Channel Follower Webhooks) */
3565
+ source_channel?: Channel;
3566
+ /** the url used for executing the webhook (returned by the webhooks OAuth2 flow) */
3567
+ url?: string;
3568
+ }
3569
+ export interface WebhooksUpdateEvent {
3570
+ /** id of the guild */
3571
+ guild_id: Snowflake;
3572
+ /** id of the channel */
3573
+ channel_id: Snowflake;
3574
+ }
3575
+ export declare enum WebhookType {
3576
+ /** Incoming Webhooks can post messages to channels with a generated token */
3577
+ INCOMING = 1,
3578
+ /** Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */
3579
+ CHANNEL_FOLLOWER = 2,
3580
+ /** Application webhooks are webhooks used with Interactions */
3581
+ APPLICATION = 3
3582
+ }
3583
+ export interface WelcomeScreen {
3584
+ /** the server description shown in the welcome screen */
3585
+ description?: string | null;
3586
+ /** the channels shown in the welcome screen, up to 5 */
3587
+ welcome_channels: WelcomeScreenChannel[];
3588
+ }
3589
+ export interface WelcomeScreenChannel {
3590
+ /** the channel's id */
3591
+ channel_id: Snowflake;
3592
+ /** the description shown for the channel */
3593
+ description: string;
3594
+ /** the emoji id, if the emoji is custom */
3595
+ emoji_id?: Snowflake | null;
3596
+ /** the emoji name if custom, the unicode character if standard, or null if no emoji is set */
3597
+ emoji_name?: string | null;
3598
+ }