disgroove 2.1.3 → 2.2.0-dev.301452e

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 (43) hide show
  1. package/dist/lib/Client.d.ts +649 -204
  2. package/dist/lib/Client.js +917 -716
  3. package/dist/lib/constants.d.ts +1 -1
  4. package/dist/lib/constants.js +7 -7
  5. package/dist/lib/gateway/Shard.d.ts +2 -1
  6. package/dist/lib/gateway/Shard.js +279 -62
  7. package/dist/lib/index.d.ts +25 -1
  8. package/dist/lib/index.js +25 -1
  9. package/dist/lib/rest/CDN.d.ts +21 -20
  10. package/dist/lib/rest/Endpoints.d.ts +82 -81
  11. package/dist/lib/rest/RequestManager.d.ts +7 -0
  12. package/dist/lib/rest/RequestManager.js +1 -5
  13. package/dist/lib/types/application-command.d.ts +19 -92
  14. package/dist/lib/types/application-role-connection-metadata.d.ts +1 -1
  15. package/dist/lib/types/application.d.ts +10 -19
  16. package/dist/lib/types/audit-log.d.ts +21 -14
  17. package/dist/lib/types/auto-moderation.d.ts +13 -32
  18. package/dist/lib/types/channel.d.ts +91 -186
  19. package/dist/lib/types/common.d.ts +4 -0
  20. package/dist/lib/types/common.js +2 -0
  21. package/dist/lib/types/emoji.d.ts +6 -14
  22. package/dist/lib/types/entitlements.d.ts +17 -21
  23. package/dist/lib/types/gateway-events.d.ts +158 -149
  24. package/dist/lib/types/guild-scheduled-event.d.ts +19 -40
  25. package/dist/lib/types/guild-template.d.ts +11 -21
  26. package/dist/lib/types/guild.d.ts +64 -217
  27. package/dist/lib/types/interaction.d.ts +37 -31
  28. package/dist/lib/types/invite.d.ts +9 -4
  29. package/dist/lib/types/message-components.d.ts +4 -3
  30. package/dist/lib/types/role.d.ts +9 -8
  31. package/dist/lib/types/sku.d.ts +5 -4
  32. package/dist/lib/types/stage-instance.d.ts +9 -19
  33. package/dist/lib/types/sticker.d.ts +18 -29
  34. package/dist/lib/types/team.d.ts +8 -7
  35. package/dist/lib/types/user.d.ts +10 -32
  36. package/dist/lib/types/voice.d.ts +12 -11
  37. package/dist/lib/types/webhook.d.ts +13 -44
  38. package/dist/lib/utils/Util.d.ts +88 -2
  39. package/dist/lib/utils/Util.js +2137 -29
  40. package/dist/package.json +3 -3
  41. package/package.json +1 -1
  42. package/dist/lib/types/index.d.ts +0 -26
  43. package/dist/lib/types/index.js +0 -40
@@ -1,15 +1,17 @@
1
- import type { Guild, User, RawGuild, RawUser } from ".";
1
+ import type { snowflake, timestamp } from "./common";
2
+ import type { RawGuild, Guild } from "./guild";
3
+ import type { RawUser, User } from "./user";
2
4
  /** https://discord.com/developers/docs/resources/guild-template#guild-template-object-guild-template-structure */
3
5
  export interface RawGuildTemplate {
4
6
  code: string;
5
7
  name: string;
6
8
  description: string | null;
7
9
  usage_count: number;
8
- creator_id: string;
10
+ creator_id: snowflake;
9
11
  creator: RawUser;
10
- created_at: string;
11
- updated_at: string;
12
- source_guild_id: string;
12
+ created_at: timestamp;
13
+ updated_at: timestamp;
14
+ source_guild_id: snowflake;
13
15
  serialized_source_guild: RawGuild;
14
16
  is_dirty: boolean | null;
15
17
  }
@@ -18,23 +20,11 @@ export interface GuildTemplate {
18
20
  name: string;
19
21
  description: string | null;
20
22
  usageCount: number;
21
- creatorId: string;
23
+ creatorId: snowflake;
22
24
  creator: User;
23
- createdAt: string;
24
- updatedAt: string;
25
- sourceGuildId: string;
25
+ createdAt: timestamp;
26
+ updatedAt: timestamp;
27
+ sourceGuildId: snowflake;
26
28
  serializedSourceGuild: Guild;
27
29
  isDirty: boolean | null;
28
30
  }
29
- export interface CreateGuildFromGuildTemplateParams {
30
- name: string;
31
- icon?: string;
32
- }
33
- export interface CreateGuildTemplateParams {
34
- name: string;
35
- description?: string | null;
36
- }
37
- export interface EditGuildTemplateParams {
38
- name?: string;
39
- description?: string | null;
40
- }
@@ -1,21 +1,26 @@
1
- import type { VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, MFALevel, PremiumTier, GuildNSFWLevel, GuildMemberFlags, IntegrationExpireBehaviors, OAuth2Scopes, SystemChannelFlags, OnboardingMode, PromptTypes, ChannelTypes, VideoQualityModes, SortOrderTypes, ForumLayoutTypes } from "../constants";
2
- import type { RawChannel, RawEmoji, RawSticker, RawUser, RawRole, Emoji, Sticker, User, Role, Channel, Overwrite, DefaultReaction, ForumTag } from ".";
1
+ import type { VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, MFALevel, PremiumTier, GuildNSFWLevel, GuildMemberFlags, IntegrationExpireBehaviors, OAuth2Scopes, SystemChannelFlags, OnboardingMode, PromptTypes } from "../constants";
2
+ import type { RawChannel, Channel } from "./channel";
3
+ import type { snowflake, timestamp } from "./common";
4
+ import type { RawEmoji, Emoji } from "./emoji";
5
+ import type { RawRole, Role } from "./role";
6
+ import type { RawSticker, Sticker } from "./sticker";
7
+ import type { RawUser, User } from "./user";
3
8
  /** https://discord.com/developers/docs/resources/guild#guild-object-guild-structure */
4
9
  export interface RawGuild {
5
- id: string;
10
+ id: snowflake;
6
11
  name: string;
7
12
  icon: string | null;
8
13
  icon_hash?: string | null;
9
14
  splash: string | null;
10
15
  discovery_splash: string | null;
11
16
  owner?: boolean;
12
- owner_id: string;
17
+ owner_id: snowflake;
13
18
  permissions?: string;
14
19
  region?: string | null;
15
- afk_channel_id: string | null;
20
+ afk_channel_id: snowflake | null;
16
21
  afk_timeout: number;
17
22
  widget_enabled?: boolean;
18
- widget_channel_id?: string | null;
23
+ widget_channel_id?: snowflake | null;
19
24
  verification_level: VerificationLevel;
20
25
  default_message_notifications: DefaultMessageNotificationLevel;
21
26
  explicit_content_filter: ExplicitContentFilterLevel;
@@ -23,10 +28,10 @@ export interface RawGuild {
23
28
  emojis: Array<RawEmoji>;
24
29
  features: Array<GuildFeatures>;
25
30
  mfa_level: MFALevel;
26
- application_id: string | null;
27
- system_channel_id: string | null;
31
+ application_id: snowflake | null;
32
+ system_channel_id: snowflake | null;
28
33
  system_channel_flags: SystemChannelFlags;
29
- rules_channel_id: string | null;
34
+ rules_channel_id: snowflake | null;
30
35
  max_presences?: number | null;
31
36
  max_members?: number;
32
37
  vanity_url_code: string | null;
@@ -35,7 +40,7 @@ export interface RawGuild {
35
40
  premium_tier: PremiumTier;
36
41
  premium_subscription_count?: number;
37
42
  preferred_locale: string;
38
- public_updates_channel_id: string | null;
43
+ public_updates_channel_id: snowflake | null;
39
44
  max_video_channel_users?: number;
40
45
  max_stage_video_channel_users?: number;
41
46
  approximate_member_count?: number;
@@ -44,16 +49,16 @@ export interface RawGuild {
44
49
  nsfw_level: GuildNSFWLevel;
45
50
  stickers?: Array<RawSticker>;
46
51
  premium_progress_bar_enabled: boolean;
47
- safety_alerts_channel_id: string | null;
52
+ safety_alerts_channel_id: snowflake | null;
48
53
  }
49
54
  /** https://discord.com/developers/docs/resources/guild#unavailable-guild-object */
50
55
  export interface RawUnavailableGuild {
51
- id: string;
56
+ id: snowflake;
52
57
  unavailable: boolean;
53
58
  }
54
59
  /** https://discord.com/developers/docs/resources/guild#guild-preview-object-guild-preview-structure */
55
60
  export interface RawGuildPreview {
56
- id: string;
61
+ id: snowflake;
57
62
  name: string;
58
63
  icon: string | null;
59
64
  splash: string | null;
@@ -68,11 +73,11 @@ export interface RawGuildPreview {
68
73
  /** https://discord.com/developers/docs/resources/guild#guild-widget-settings-object-guild-widget-settings-structure */
69
74
  export interface RawGuildWidgetSettings {
70
75
  enabled: boolean;
71
- channel_id: string | null;
76
+ channel_id: snowflake | null;
72
77
  }
73
78
  /** https://discord.com/developers/docs/resources/guild#guild-widget-object-guild-widget-structure */
74
79
  export interface RawGuildWidget {
75
- id: string;
80
+ id: snowflake;
76
81
  name: string;
77
82
  instant_invite: string | null;
78
83
  channels: Array<RawChannel>;
@@ -84,8 +89,8 @@ export interface RawGuildMember {
84
89
  user?: RawUser;
85
90
  nick?: string | null;
86
91
  avatar?: string | null;
87
- roles: Array<string>;
88
- joined_at: string;
92
+ roles: Array<snowflake>;
93
+ joined_at: timestamp;
89
94
  premium_since?: number | null;
90
95
  deaf: boolean;
91
96
  mute: boolean;
@@ -96,18 +101,18 @@ export interface RawGuildMember {
96
101
  }
97
102
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
98
103
  export interface RawIntegration {
99
- id: string;
104
+ id: snowflake;
100
105
  name: string;
101
106
  type: string;
102
107
  enabled: boolean;
103
108
  syncing?: boolean;
104
- role_id?: string;
109
+ role_id?: snowflake;
105
110
  enable_emoticons?: boolean;
106
111
  expire_behavior?: IntegrationExpireBehaviors;
107
112
  expire_grace_period?: number;
108
113
  user?: RawUser;
109
114
  account: RawIntegrationAccount;
110
- synced_at?: string;
115
+ synced_at?: timestamp;
111
116
  subscriber_count?: number;
112
117
  revoked?: boolean;
113
118
  application?: RawIntegrationApplication;
@@ -115,12 +120,12 @@ export interface RawIntegration {
115
120
  }
116
121
  /** https://discord.com/developers/docs/resources/guild#integration-account-object-integration-account-structure */
117
122
  export interface RawIntegrationAccount {
118
- id: string;
123
+ id: snowflake;
119
124
  name: string;
120
125
  }
121
126
  /** https://discord.com/developers/docs/resources/guild#integration-application-object-integration-application-structure */
122
127
  export interface RawIntegrationApplication {
123
- id: string;
128
+ id: snowflake;
124
129
  name: string;
125
130
  icon: string | null;
126
131
  description: string;
@@ -138,22 +143,22 @@ export interface RawWelcomeScreen {
138
143
  }
139
144
  /** https://discord.com/developers/docs/resources/guild#welcome-screen-object-welcome-screen-channel-structure */
140
145
  export interface RawWelcomeScreenChannel {
141
- channel_id: string;
146
+ channel_id: snowflake;
142
147
  description: string;
143
- emoji_id: string | null;
148
+ emoji_id: snowflake | null;
144
149
  emoji_name: string | null;
145
150
  }
146
151
  /** https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure */
147
152
  export interface RawGuildOnboarding {
148
- guild_id: string;
153
+ guild_id: snowflake;
149
154
  prompts: Array<RawOnboardingPrompt>;
150
- default_channel_ids: Array<string>;
155
+ default_channel_ids: Array<snowflake>;
151
156
  enabled: boolean;
152
157
  mode: OnboardingMode;
153
158
  }
154
159
  /** https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure */
155
160
  export interface RawOnboardingPrompt {
156
- id: string;
161
+ id: snowflake;
157
162
  type: PromptTypes;
158
163
  options: Array<RawPromptOption>;
159
164
  title: string;
@@ -163,31 +168,31 @@ export interface RawOnboardingPrompt {
163
168
  }
164
169
  /** https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure */
165
170
  export interface RawPromptOption {
166
- id: string;
167
- channel_ids: Array<string>;
168
- role_ids: Array<string>;
171
+ id: snowflake;
172
+ channel_ids: Array<snowflake>;
173
+ role_ids: Array<snowflake>;
169
174
  emoji?: RawEmoji;
170
- emoji_id?: string;
175
+ emoji_id?: snowflake;
171
176
  emoji_name?: string;
172
177
  emoji_animated?: boolean;
173
178
  title: string;
174
179
  description: string | null;
175
180
  }
176
181
  export interface Guild {
177
- id: string;
182
+ id: snowflake;
178
183
  name: string;
179
184
  icon: string | null;
180
185
  iconHash?: string | null;
181
186
  splash: string | null;
182
187
  discoverySplash: string | null;
183
188
  owner?: boolean;
184
- ownerId: string;
189
+ ownerId: snowflake;
185
190
  permissions?: string;
186
191
  region?: string | null;
187
- afkChannelId: string | null;
192
+ afkChannelId: snowflake | null;
188
193
  afkTimeout: number;
189
194
  widgetEnabled?: boolean;
190
- widgetChannelId?: string | null;
195
+ widgetChannelId?: snowflake | null;
191
196
  verificationLevel: VerificationLevel;
192
197
  defaultMessageNotifications: DefaultMessageNotificationLevel;
193
198
  explicitContentFilter: ExplicitContentFilterLevel;
@@ -195,10 +200,10 @@ export interface Guild {
195
200
  emojis: Array<Emoji>;
196
201
  features: Array<GuildFeatures>;
197
202
  mfaLevel: MFALevel;
198
- applicationId: string | null;
199
- systemChannelId: string | null;
203
+ applicationId: snowflake | null;
204
+ systemChannelId: snowflake | null;
200
205
  systemChannelFlags: SystemChannelFlags;
201
- rulesChannelId: string | null;
206
+ rulesChannelId: snowflake | null;
202
207
  maxPresences?: number | null;
203
208
  maxMembers?: number;
204
209
  vanityUrlCode: string | null;
@@ -207,7 +212,7 @@ export interface Guild {
207
212
  premiumTier: PremiumTier;
208
213
  premiumSubscriptionCount?: number;
209
214
  preferredLocale: string;
210
- publicUpdatesChannelId: string | null;
215
+ publicUpdatesChannelId: snowflake | null;
211
216
  maxVideoChannelUsers?: number;
212
217
  maxStageVideoChannelUsers?: number;
213
218
  approximateMemberCount?: number;
@@ -216,14 +221,14 @@ export interface Guild {
216
221
  nsfwLevel: GuildNSFWLevel;
217
222
  stickers?: Array<Sticker>;
218
223
  premiumProgressBarEnabled: boolean;
219
- safetyAlertsChannelId: string | null;
224
+ safetyAlertsChannelId: snowflake | null;
220
225
  }
221
226
  export interface UnavailableGuild {
222
- id: string;
227
+ id: snowflake;
223
228
  unavailable: boolean;
224
229
  }
225
230
  export interface GuildPreview {
226
- id: string;
231
+ id: snowflake;
227
232
  name: string;
228
233
  icon: string | null;
229
234
  splash: string | null;
@@ -237,10 +242,10 @@ export interface GuildPreview {
237
242
  }
238
243
  export interface GuildWidgetSettings {
239
244
  enabled: boolean;
240
- channelId: string | null;
245
+ channelId: snowflake | null;
241
246
  }
242
247
  export interface GuildWidget {
243
- id: string;
248
+ id: snowflake;
244
249
  name: string;
245
250
  instantInvite: string | null;
246
251
  channels: Array<Channel>;
@@ -251,7 +256,7 @@ export interface GuildMember {
251
256
  user?: User;
252
257
  nick?: string | null;
253
258
  avatar?: string | null;
254
- roles: Array<string>;
259
+ roles: Array<snowflake>;
255
260
  joinedAt: string;
256
261
  premiumSince?: number | null;
257
262
  deaf: boolean;
@@ -262,29 +267,29 @@ export interface GuildMember {
262
267
  communicationDisabledUntil?: number | null;
263
268
  }
264
269
  export interface Integration {
265
- id: string;
270
+ id: snowflake;
266
271
  name: string;
267
272
  type: string;
268
273
  enabled: boolean;
269
274
  syncing?: boolean;
270
- roleId?: string;
275
+ roleId?: snowflake;
271
276
  enableEmoticons?: boolean;
272
277
  expireBehavior?: IntegrationExpireBehaviors;
273
278
  expireGracePeriod?: number;
274
279
  user?: User;
275
280
  account: IntegrationAccount;
276
- syncedAt?: string;
281
+ syncedAt?: timestamp;
277
282
  subscriberCount?: number;
278
283
  revoked?: boolean;
279
284
  application?: IntegrationApplication;
280
285
  scopes?: Array<OAuth2Scopes>;
281
286
  }
282
287
  export interface IntegrationAccount {
283
- id: string;
288
+ id: snowflake;
284
289
  name: string;
285
290
  }
286
291
  export interface IntegrationApplication {
287
- id: string;
292
+ id: snowflake;
288
293
  name: string;
289
294
  icon: string | null;
290
295
  description: string;
@@ -299,20 +304,20 @@ export interface WelcomeScreen {
299
304
  welcomeChannels: Array<WelcomeScreenChannel>;
300
305
  }
301
306
  export interface WelcomeScreenChannel {
302
- channelId: string;
307
+ channelId: snowflake;
303
308
  description: string;
304
- emojiId: string | null;
309
+ emojiId: snowflake | null;
305
310
  emojiName: string | null;
306
311
  }
307
312
  export interface GuildOnboarding {
308
- guildId: string;
313
+ guildId: snowflake;
309
314
  prompts: Array<OnboardingPrompt>;
310
- defaultChannelIds: Array<string>;
315
+ defaultChannelIds: Array<snowflake>;
311
316
  enabled: boolean;
312
317
  mode: OnboardingMode;
313
318
  }
314
319
  export interface OnboardingPrompt {
315
- id: string;
320
+ id: snowflake;
316
321
  type: PromptTypes;
317
322
  options: Array<PromptOption>;
318
323
  title: string;
@@ -321,171 +326,13 @@ export interface OnboardingPrompt {
321
326
  inOnboarding: boolean;
322
327
  }
323
328
  export interface PromptOption {
324
- id: string;
325
- channelIds: Array<string>;
326
- roleIds: Array<string>;
329
+ id: snowflake;
330
+ channelIds: Array<snowflake>;
331
+ roleIds: Array<snowflake>;
327
332
  emoji?: Emoji;
328
- emojiId?: string;
333
+ emojiId?: snowflake;
329
334
  emojiName?: string;
330
335
  emojiAnimated?: boolean;
331
336
  title: string;
332
337
  description: string | null;
333
338
  }
334
- export interface CreateGuildParams {
335
- name: string;
336
- region?: string | null;
337
- icon?: string;
338
- verificationLevel?: VerificationLevel;
339
- defaultMessageNotifications?: DefaultMessageNotificationLevel;
340
- explicitContentFilter?: ExplicitContentFilterLevel;
341
- roles?: Array<{
342
- name?: string;
343
- permissions?: string;
344
- color?: number;
345
- hoist?: boolean;
346
- icon?: string | null;
347
- unicodeEmoji?: string | null;
348
- mentionable?: boolean;
349
- }>;
350
- channels?: Array<{
351
- name: string;
352
- type: ChannelTypes;
353
- id?: number;
354
- parentId?: number;
355
- }>;
356
- afkChannelId?: string;
357
- afkTimeout?: number;
358
- systemChannelId?: string;
359
- systemChannelFlags?: SystemChannelFlags;
360
- }
361
- export interface EditGuildParams {
362
- name?: string;
363
- region?: string | null;
364
- verificationLevel?: VerificationLevel;
365
- defaultMessageNotifications?: DefaultMessageNotificationLevel;
366
- explicitContentFilter?: ExplicitContentFilterLevel;
367
- afkChannelId?: string | null;
368
- afkTimeout?: number;
369
- icon?: string | null;
370
- ownerId?: string;
371
- splash?: string | null;
372
- discoverySplash?: string | null;
373
- banner?: string | null;
374
- systemChannelId?: string | null;
375
- systemChannelFlags?: SystemChannelFlags;
376
- rulesChannelId?: string | null;
377
- publicUpdatesChannelId?: string | null;
378
- preferredLocale?: string;
379
- features?: Array<GuildFeatures>;
380
- description?: string | null;
381
- premiumProgressBarEnabled?: boolean;
382
- safetyAlertsChannelId?: string | null;
383
- }
384
- export interface CreateGuildChannelParams {
385
- name: string | null;
386
- type?: ChannelTypes;
387
- topic?: string | null;
388
- bitrate?: number;
389
- userLimit?: number;
390
- rateLimitPerUser?: number;
391
- position?: number;
392
- permissionOverwrites?: Array<Overwrite>;
393
- parentId?: string | null;
394
- nsfw?: boolean;
395
- rtcRegion?: string | null;
396
- videoQualityMode?: VideoQualityModes;
397
- defaultAutoArchiveDuration?: number;
398
- defaultReactionEmoji?: DefaultReaction | null;
399
- availableTags?: Array<ForumTag>;
400
- defaultSortOrder?: SortOrderTypes | null;
401
- defaultForumLayout?: ForumLayoutTypes;
402
- defaultThreadRateLimitPerUser?: number;
403
- }
404
- export type EditGuildChannelPositionsParams = Array<{
405
- id: string;
406
- position?: number | null;
407
- lockPermissions?: boolean | null;
408
- parentId?: string | null;
409
- }>;
410
- export interface AddGuildMemberParams {
411
- accessToken: string;
412
- nick?: string;
413
- roles?: Array<string>;
414
- mute?: boolean;
415
- deaf?: boolean;
416
- }
417
- export interface EditCurrentGuildMemberParams {
418
- nick?: string;
419
- }
420
- export interface EditGuildMemberParams {
421
- nick?: string | null;
422
- roles?: Array<string> | null;
423
- mute?: boolean | null;
424
- deaf?: boolean | null;
425
- channelId?: string | null;
426
- communicationDisabledUntil?: number | null;
427
- flags?: GuildMemberFlags;
428
- }
429
- export interface EditGuildMemberParams {
430
- nick?: string | null;
431
- }
432
- export interface CreateGuildBanParams {
433
- deleteMessageDays?: number;
434
- deleteMessageSeconds?: number;
435
- }
436
- export interface BulkGuildBanParams {
437
- userIds: Array<string>;
438
- deleteMessageSeconds?: number;
439
- }
440
- export interface CreateGuildRoleParams {
441
- name?: string;
442
- permissions?: string;
443
- color?: number;
444
- hoist?: boolean;
445
- icon?: string | null;
446
- unicodeEmoji?: string | null;
447
- mentionable?: boolean;
448
- }
449
- export type EditGuildRolePositionsParams = Array<{
450
- id: string;
451
- position?: number | null;
452
- }>;
453
- export interface EditGuildRoleParams {
454
- name?: string | null;
455
- permissions?: string | null;
456
- color?: number | null;
457
- hoist?: boolean | null;
458
- icon?: string | null;
459
- unicodeEmoji?: string | null;
460
- mentionable?: boolean | null;
461
- }
462
- export interface EditGuildMFALevelParams {
463
- level: MFALevel;
464
- }
465
- export interface BeginGuildPruneParams {
466
- days: number;
467
- computePruneCount: boolean;
468
- includeRoles: Array<string>;
469
- reason?: string;
470
- }
471
- export interface EditGuildWelcomeScreenParams {
472
- enabled?: boolean | null;
473
- welcomeChannels?: Array<WelcomeScreenChannel> | null;
474
- description?: string | null;
475
- }
476
- export interface EditGuildOnboardingParams {
477
- prompts: Array<OnboardingPrompt>;
478
- defaultChannelIds: Array<string>;
479
- enabled: boolean;
480
- mode: OnboardingMode;
481
- }
482
- export interface EditCurrentUserVoiceStateParams {
483
- channelId?: string;
484
- suppress?: boolean;
485
- requestToSpeakTimestamp?: string | null;
486
- }
487
- export interface EditUserVoiceStateParams {
488
- channelId?: string;
489
- suppress?: boolean;
490
- requestToSpeakTimestamp?: string | null;
491
- }
@@ -1,15 +1,23 @@
1
- import type { RawAttachment, RawChannel, RawGuildMember, RawMessage, RawUser, RawRole, Attachment, User, GuildMember, Message, Role, Channel, Entitlement, RawEntitlement, RawEmbed, RawAllowedMentions, RawActionRow, RawApplicationCommandOptionChoice, Embed, AllowedMentions, ActionRow, ApplicationCommandOptionChoice, RawTextInput, TextInput, ExecuteWebhookParams, RawPollCreateParams, PollCreateParams } from ".";
2
1
  import type { ApplicationCommandOptionType, ApplicationCommandTypes, ComponentTypes, InteractionCallbackType, InteractionType, MessageFlags } from "../constants";
3
2
  import type { File } from "../rest";
3
+ import type { RawApplicationCommandOptionChoice, ApplicationCommandOptionChoice } from "./application-command";
4
+ import type { RawChannel, RawMessage, RawAttachment, RawEmbed, RawAllowedMentions, Channel, Message, Attachment, Embed, AllowedMentions } from "./channel";
5
+ import type { snowflake } from "./common";
6
+ import type { RawEntitlement, Entitlement } from "./entitlements";
7
+ import type { RawGuildMember, GuildMember } from "./guild";
8
+ import type { RawTextInput, RawActionRow, TextInput, ActionRow } from "./message-components";
9
+ import type { RawPollCreateParams, PollCreateParams } from "./poll";
10
+ import type { RawRole, Role } from "./role";
11
+ import type { RawUser, User } from "./user";
4
12
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
5
13
  export interface RawInteraction {
6
- id: string;
7
- application_id: string;
14
+ id: snowflake;
15
+ application_id: snowflake;
8
16
  type: InteractionType;
9
17
  data?: RawApplicationCommandData & RawMessageComponentData & RawModalSubmitData;
10
- guild_id?: string;
18
+ guild_id?: snowflake;
11
19
  channel?: RawChannel;
12
- channel_id?: string;
20
+ channel_id?: snowflake;
13
21
  member?: RawGuildMember;
14
22
  user?: RawUser;
15
23
  token: string;
@@ -22,13 +30,13 @@ export interface RawInteraction {
22
30
  }
23
31
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-data-structure */
24
32
  export interface RawApplicationCommandData {
25
- id: string;
33
+ id: snowflake;
26
34
  name: string;
27
35
  type: ApplicationCommandTypes;
28
36
  resolved?: RawResolvedData;
29
37
  options?: Array<RawApplicationCommandInteractionDataOption>;
30
- guild_id?: string;
31
- target_id?: string;
38
+ guild_id?: snowflake;
39
+ target_id?: snowflake;
32
40
  }
33
41
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-message-component-data-structure */
34
42
  export interface RawMessageComponentData {
@@ -47,12 +55,12 @@ export interface RawModalSubmitData {
47
55
  }
48
56
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure */
49
57
  export interface RawResolvedData {
50
- users?: Record<string, RawUser>;
51
- members?: Record<string, RawGuildMember>;
52
- roles?: Record<string, RawRole>;
53
- channels?: Record<string, RawChannel>;
54
- messages?: Record<string, RawMessage>;
55
- attachments?: Record<string, RawAttachment>;
58
+ users?: Record<snowflake, RawUser>;
59
+ members?: Record<snowflake, RawGuildMember>;
60
+ roles?: Record<snowflake, RawRole>;
61
+ channels?: Record<snowflake, RawChannel>;
62
+ messages?: Record<snowflake, RawMessage>;
63
+ attachments?: Record<snowflake, RawAttachment>;
56
64
  }
57
65
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-interaction-data-option-structure */
58
66
  export interface RawApplicationCommandInteractionDataOption {
@@ -64,7 +72,7 @@ export interface RawApplicationCommandInteractionDataOption {
64
72
  }
65
73
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure */
66
74
  export interface RawMessageInteraction {
67
- id: string;
75
+ id: snowflake;
68
76
  type: InteractionType;
69
77
  name: string;
70
78
  user: RawUser;
@@ -91,13 +99,13 @@ export interface RawInteractionCallbackData {
91
99
  title?: string;
92
100
  }
93
101
  export interface Interaction {
94
- id: string;
95
- applicationId: string;
102
+ id: snowflake;
103
+ applicationId: snowflake;
96
104
  type: InteractionType;
97
105
  data?: ApplicationCommandData & MessageComponentData & ModalSubmitData;
98
- guildId?: string;
106
+ guildId?: snowflake;
99
107
  channel?: Channel;
100
- channelId?: string;
108
+ channelId?: snowflake;
101
109
  member?: GuildMember;
102
110
  user?: User;
103
111
  token: string;
@@ -109,13 +117,13 @@ export interface Interaction {
109
117
  entitlements: Array<Entitlement>;
110
118
  }
111
119
  export interface ApplicationCommandData {
112
- id: string;
120
+ id: snowflake;
113
121
  name: string;
114
122
  type: ApplicationCommandTypes;
115
123
  resolved?: ResolvedData;
116
124
  options?: Array<ApplicationCommandInteractionDataOption>;
117
- guildId?: string;
118
- targetId?: string;
125
+ guildId?: snowflake;
126
+ targetId?: snowflake;
119
127
  }
120
128
  export interface MessageComponentData {
121
129
  customId: string;
@@ -131,12 +139,12 @@ export interface ModalSubmitData {
131
139
  }>;
132
140
  }
133
141
  export interface ResolvedData {
134
- users?: Record<string, User>;
135
- members?: Record<string, GuildMember>;
136
- roles?: Record<string, Role>;
137
- channels?: Record<string, Channel>;
138
- messages?: Record<string, Message>;
139
- attachments?: Record<string, Attachment>;
142
+ users?: Record<snowflake, User>;
143
+ members?: Record<snowflake, GuildMember>;
144
+ roles?: Record<snowflake, Role>;
145
+ channels?: Record<snowflake, Channel>;
146
+ messages?: Record<snowflake, Message>;
147
+ attachments?: Record<snowflake, Attachment>;
140
148
  }
141
149
  export interface ApplicationCommandInteractionDataOption {
142
150
  name: string;
@@ -146,7 +154,7 @@ export interface ApplicationCommandInteractionDataOption {
146
154
  focused?: boolean;
147
155
  }
148
156
  export interface MessageInteraction {
149
- id: string;
157
+ id: snowflake;
150
158
  type: InteractionType;
151
159
  name: string;
152
160
  user: User;
@@ -170,5 +178,3 @@ export interface InteractionCallbackData {
170
178
  customId?: string;
171
179
  title?: string;
172
180
  }
173
- export interface CreateInteractionFollowupMessageParams extends Omit<ExecuteWebhookParams, "threadId" | "avatarUrl" | "username"> {
174
- }