disgroove 2.1.3 → 2.2.0-dev.15819eb

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 (40) hide show
  1. package/dist/lib/Client.d.ts +213 -195
  2. package/dist/lib/constants.d.ts +1 -1
  3. package/dist/lib/constants.js +7 -7
  4. package/dist/lib/gateway/Shard.d.ts +2 -1
  5. package/dist/lib/gateway/Shard.js +2 -0
  6. package/dist/lib/index.d.ts +0 -1
  7. package/dist/lib/index.js +0 -1
  8. package/dist/lib/rest/CDN.d.ts +21 -20
  9. package/dist/lib/rest/Endpoints.d.ts +82 -81
  10. package/dist/lib/rest/RequestManager.d.ts +7 -0
  11. package/dist/lib/rest/RequestManager.js +1 -5
  12. package/dist/lib/types/application-command.d.ts +21 -21
  13. package/dist/lib/types/application-role-connection-metadata.d.ts +1 -1
  14. package/dist/lib/types/application.d.ts +10 -7
  15. package/dist/lib/types/audit-log.d.ts +21 -14
  16. package/dist/lib/types/auto-moderation.d.ts +13 -12
  17. package/dist/lib/types/channel.d.ts +96 -88
  18. package/dist/lib/types/common.d.ts +4 -0
  19. package/dist/lib/types/common.js +2 -0
  20. package/dist/lib/types/emoji.d.ts +6 -5
  21. package/dist/lib/types/entitlements.d.ts +19 -18
  22. package/dist/lib/types/gateway-events.d.ts +158 -149
  23. package/dist/lib/types/guild-scheduled-event.d.ts +21 -19
  24. package/dist/lib/types/guild-template.d.ts +11 -9
  25. package/dist/lib/types/guild.d.ts +84 -79
  26. package/dist/lib/types/interaction.d.ts +38 -29
  27. package/dist/lib/types/invite.d.ts +9 -4
  28. package/dist/lib/types/message-components.d.ts +4 -3
  29. package/dist/lib/types/role.d.ts +9 -8
  30. package/dist/lib/types/sku.d.ts +5 -4
  31. package/dist/lib/types/stage-instance.d.ts +11 -10
  32. package/dist/lib/types/sticker.d.ts +18 -17
  33. package/dist/lib/types/team.d.ts +8 -7
  34. package/dist/lib/types/user.d.ts +11 -9
  35. package/dist/lib/types/voice.d.ts +12 -11
  36. package/dist/lib/types/webhook.d.ts +15 -10
  37. package/dist/package.json +3 -3
  38. package/package.json +1 -1
  39. package/dist/lib/types/index.d.ts +0 -26
  40. 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,11 +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
  }
@@ -1,21 +1,26 @@
1
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 ".";
2
+ import type { RawChannel, Channel, Overwrite, DefaultReaction, ForumTag } 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,11 +326,11 @@ 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;
@@ -353,9 +358,9 @@ export interface CreateGuildParams {
353
358
  id?: number;
354
359
  parentId?: number;
355
360
  }>;
356
- afkChannelId?: string;
361
+ afkChannelId?: snowflake;
357
362
  afkTimeout?: number;
358
- systemChannelId?: string;
363
+ systemChannelId?: snowflake;
359
364
  systemChannelFlags?: SystemChannelFlags;
360
365
  }
361
366
  export interface EditGuildParams {
@@ -364,22 +369,22 @@ export interface EditGuildParams {
364
369
  verificationLevel?: VerificationLevel;
365
370
  defaultMessageNotifications?: DefaultMessageNotificationLevel;
366
371
  explicitContentFilter?: ExplicitContentFilterLevel;
367
- afkChannelId?: string | null;
372
+ afkChannelId?: snowflake | null;
368
373
  afkTimeout?: number;
369
374
  icon?: string | null;
370
- ownerId?: string;
375
+ ownerId?: snowflake;
371
376
  splash?: string | null;
372
377
  discoverySplash?: string | null;
373
378
  banner?: string | null;
374
- systemChannelId?: string | null;
379
+ systemChannelId?: snowflake | null;
375
380
  systemChannelFlags?: SystemChannelFlags;
376
- rulesChannelId?: string | null;
377
- publicUpdatesChannelId?: string | null;
381
+ rulesChannelId?: snowflake | null;
382
+ publicUpdatesChannelId?: snowflake | null;
378
383
  preferredLocale?: string;
379
384
  features?: Array<GuildFeatures>;
380
385
  description?: string | null;
381
386
  premiumProgressBarEnabled?: boolean;
382
- safetyAlertsChannelId?: string | null;
387
+ safetyAlertsChannelId?: snowflake | null;
383
388
  }
384
389
  export interface CreateGuildChannelParams {
385
390
  name: string | null;
@@ -390,7 +395,7 @@ export interface CreateGuildChannelParams {
390
395
  rateLimitPerUser?: number;
391
396
  position?: number;
392
397
  permissionOverwrites?: Array<Overwrite>;
393
- parentId?: string | null;
398
+ parentId?: snowflake | null;
394
399
  nsfw?: boolean;
395
400
  rtcRegion?: string | null;
396
401
  videoQualityMode?: VideoQualityModes;
@@ -402,10 +407,10 @@ export interface CreateGuildChannelParams {
402
407
  defaultThreadRateLimitPerUser?: number;
403
408
  }
404
409
  export type EditGuildChannelPositionsParams = Array<{
405
- id: string;
410
+ id: snowflake;
406
411
  position?: number | null;
407
412
  lockPermissions?: boolean | null;
408
- parentId?: string | null;
413
+ parentId?: snowflake | null;
409
414
  }>;
410
415
  export interface AddGuildMemberParams {
411
416
  accessToken: string;
@@ -419,10 +424,10 @@ export interface EditCurrentGuildMemberParams {
419
424
  }
420
425
  export interface EditGuildMemberParams {
421
426
  nick?: string | null;
422
- roles?: Array<string> | null;
427
+ roles?: Array<snowflake> | null;
423
428
  mute?: boolean | null;
424
429
  deaf?: boolean | null;
425
- channelId?: string | null;
430
+ channelId?: snowflake | null;
426
431
  communicationDisabledUntil?: number | null;
427
432
  flags?: GuildMemberFlags;
428
433
  }
@@ -434,7 +439,7 @@ export interface CreateGuildBanParams {
434
439
  deleteMessageSeconds?: number;
435
440
  }
436
441
  export interface BulkGuildBanParams {
437
- userIds: Array<string>;
442
+ userIds: Array<snowflake>;
438
443
  deleteMessageSeconds?: number;
439
444
  }
440
445
  export interface CreateGuildRoleParams {
@@ -447,7 +452,7 @@ export interface CreateGuildRoleParams {
447
452
  mentionable?: boolean;
448
453
  }
449
454
  export type EditGuildRolePositionsParams = Array<{
450
- id: string;
455
+ id: snowflake;
451
456
  position?: number | null;
452
457
  }>;
453
458
  export interface EditGuildRoleParams {
@@ -465,7 +470,7 @@ export interface EditGuildMFALevelParams {
465
470
  export interface BeginGuildPruneParams {
466
471
  days: number;
467
472
  computePruneCount: boolean;
468
- includeRoles: Array<string>;
473
+ includeRoles: Array<snowflake>;
469
474
  reason?: string;
470
475
  }
471
476
  export interface EditGuildWelcomeScreenParams {
@@ -475,17 +480,17 @@ export interface EditGuildWelcomeScreenParams {
475
480
  }
476
481
  export interface EditGuildOnboardingParams {
477
482
  prompts: Array<OnboardingPrompt>;
478
- defaultChannelIds: Array<string>;
483
+ defaultChannelIds: Array<snowflake>;
479
484
  enabled: boolean;
480
485
  mode: OnboardingMode;
481
486
  }
482
487
  export interface EditCurrentUserVoiceStateParams {
483
- channelId?: string;
488
+ channelId?: snowflake;
484
489
  suppress?: boolean;
485
- requestToSpeakTimestamp?: string | null;
490
+ requestToSpeakTimestamp?: timestamp | null;
486
491
  }
487
492
  export interface EditUserVoiceStateParams {
488
- channelId?: string;
493
+ channelId?: snowflake;
489
494
  suppress?: boolean;
490
- requestToSpeakTimestamp?: string | null;
495
+ requestToSpeakTimestamp?: timestamp | null;
491
496
  }
@@ -1,15 +1,24 @@
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";
12
+ import type { ExecuteWebhookParams } from "./webhook";
4
13
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
5
14
  export interface RawInteraction {
6
- id: string;
7
- application_id: string;
15
+ id: snowflake;
16
+ application_id: snowflake;
8
17
  type: InteractionType;
9
18
  data?: RawApplicationCommandData & RawMessageComponentData & RawModalSubmitData;
10
- guild_id?: string;
19
+ guild_id?: snowflake;
11
20
  channel?: RawChannel;
12
- channel_id?: string;
21
+ channel_id?: snowflake;
13
22
  member?: RawGuildMember;
14
23
  user?: RawUser;
15
24
  token: string;
@@ -22,13 +31,13 @@ export interface RawInteraction {
22
31
  }
23
32
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-data-structure */
24
33
  export interface RawApplicationCommandData {
25
- id: string;
34
+ id: snowflake;
26
35
  name: string;
27
36
  type: ApplicationCommandTypes;
28
37
  resolved?: RawResolvedData;
29
38
  options?: Array<RawApplicationCommandInteractionDataOption>;
30
- guild_id?: string;
31
- target_id?: string;
39
+ guild_id?: snowflake;
40
+ target_id?: snowflake;
32
41
  }
33
42
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-message-component-data-structure */
34
43
  export interface RawMessageComponentData {
@@ -47,12 +56,12 @@ export interface RawModalSubmitData {
47
56
  }
48
57
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure */
49
58
  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>;
59
+ users?: Record<snowflake, RawUser>;
60
+ members?: Record<snowflake, RawGuildMember>;
61
+ roles?: Record<snowflake, RawRole>;
62
+ channels?: Record<snowflake, RawChannel>;
63
+ messages?: Record<snowflake, RawMessage>;
64
+ attachments?: Record<snowflake, RawAttachment>;
56
65
  }
57
66
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-interaction-data-option-structure */
58
67
  export interface RawApplicationCommandInteractionDataOption {
@@ -64,7 +73,7 @@ export interface RawApplicationCommandInteractionDataOption {
64
73
  }
65
74
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure */
66
75
  export interface RawMessageInteraction {
67
- id: string;
76
+ id: snowflake;
68
77
  type: InteractionType;
69
78
  name: string;
70
79
  user: RawUser;
@@ -91,13 +100,13 @@ export interface RawInteractionCallbackData {
91
100
  title?: string;
92
101
  }
93
102
  export interface Interaction {
94
- id: string;
95
- applicationId: string;
103
+ id: snowflake;
104
+ applicationId: snowflake;
96
105
  type: InteractionType;
97
106
  data?: ApplicationCommandData & MessageComponentData & ModalSubmitData;
98
- guildId?: string;
107
+ guildId?: snowflake;
99
108
  channel?: Channel;
100
- channelId?: string;
109
+ channelId?: snowflake;
101
110
  member?: GuildMember;
102
111
  user?: User;
103
112
  token: string;
@@ -109,13 +118,13 @@ export interface Interaction {
109
118
  entitlements: Array<Entitlement>;
110
119
  }
111
120
  export interface ApplicationCommandData {
112
- id: string;
121
+ id: snowflake;
113
122
  name: string;
114
123
  type: ApplicationCommandTypes;
115
124
  resolved?: ResolvedData;
116
125
  options?: Array<ApplicationCommandInteractionDataOption>;
117
- guildId?: string;
118
- targetId?: string;
126
+ guildId?: snowflake;
127
+ targetId?: snowflake;
119
128
  }
120
129
  export interface MessageComponentData {
121
130
  customId: string;
@@ -131,12 +140,12 @@ export interface ModalSubmitData {
131
140
  }>;
132
141
  }
133
142
  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>;
143
+ users?: Record<snowflake, User>;
144
+ members?: Record<snowflake, GuildMember>;
145
+ roles?: Record<snowflake, Role>;
146
+ channels?: Record<snowflake, Channel>;
147
+ messages?: Record<snowflake, Message>;
148
+ attachments?: Record<snowflake, Attachment>;
140
149
  }
141
150
  export interface ApplicationCommandInteractionDataOption {
142
151
  name: string;
@@ -146,7 +155,7 @@ export interface ApplicationCommandInteractionDataOption {
146
155
  focused?: boolean;
147
156
  }
148
157
  export interface MessageInteraction {
149
- id: string;
158
+ id: snowflake;
150
159
  type: InteractionType;
151
160
  name: string;
152
161
  user: User;
@@ -1,5 +1,10 @@
1
- import type { Application, Channel, Guild, GuildMember, GuildScheduledEvent, User, RawApplication, RawChannel, RawGuild, RawGuildMember, RawGuildScheduledEvent, RawUser } from ".";
2
1
  import type { InviteTargetTypes, InviteTypes } from "../constants";
2
+ import type { RawApplication, Application } from "./application";
3
+ import type { RawChannel, Channel } from "./channel";
4
+ import type { timestamp } from "./common";
5
+ import type { RawGuild, RawGuildMember, Guild, GuildMember } from "./guild";
6
+ import type { RawGuildScheduledEvent, GuildScheduledEvent } from "./guild-scheduled-event";
7
+ import type { RawUser, User } from "./user";
3
8
  /** https://discord.com/developers/docs/resources/invite#invite-object-invite-structure */
4
9
  export interface RawInvite {
5
10
  type: InviteTypes;
@@ -12,7 +17,7 @@ export interface RawInvite {
12
17
  target_application?: RawApplication;
13
18
  approximate_presence_count?: number;
14
19
  approximate_member_count?: number;
15
- expires_at?: string | null;
20
+ expires_at?: timestamp | null;
16
21
  stage_instance?: RawInviteStageInstance;
17
22
  guild_scheduled_event?: RawGuildScheduledEvent;
18
23
  }
@@ -22,7 +27,7 @@ export interface RawInviteMetadata {
22
27
  max_uses: number;
23
28
  max_age: number;
24
29
  temporary: boolean;
25
- created_at: string;
30
+ created_at: timestamp;
26
31
  }
27
32
  /** https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure */
28
33
  export interface RawInviteStageInstance {
@@ -42,7 +47,7 @@ export interface Invite {
42
47
  targetApplication?: Application;
43
48
  approximatePresenceCount?: number;
44
49
  approximateMemberCount?: number;
45
- expiresAt?: string | null;
50
+ expiresAt?: timestamp | null;
46
51
  stageInstance?: InviteStageInstance;
47
52
  guildScheduledEvent?: GuildScheduledEvent;
48
53
  }