disgroove 2.2.7 → 3.0.0-dev.2cf2b90

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 (92) hide show
  1. package/LICENSE +9 -9
  2. package/README.md +48 -48
  3. package/dist/lib/Client.d.ts +295 -300
  4. package/dist/lib/Client.js +480 -473
  5. package/dist/lib/constants.d.ts +7 -4
  6. package/dist/lib/constants.js +6 -3
  7. package/dist/lib/gateway/Dispatcher.d.ts +104 -0
  8. package/dist/lib/gateway/Dispatcher.js +471 -0
  9. package/dist/lib/gateway/Shard.d.ts +12 -21
  10. package/dist/lib/gateway/Shard.js +120 -584
  11. package/dist/lib/gateway/Transmitter.d.ts +22 -0
  12. package/dist/lib/gateway/Transmitter.js +93 -0
  13. package/dist/lib/gateway/WebSocketManager.d.ts +22 -0
  14. package/dist/lib/gateway/WebSocketManager.js +93 -0
  15. package/dist/lib/index.d.ts +4 -0
  16. package/dist/lib/index.js +4 -0
  17. package/dist/lib/rest/Endpoints.d.ts +94 -94
  18. package/dist/lib/rest/Endpoints.js +104 -104
  19. package/dist/lib/rest/RequestManager.js +17 -7
  20. package/dist/lib/rest/index.js +17 -7
  21. package/dist/lib/transformers/ApplicationCommands.js +4 -4
  22. package/dist/lib/transformers/Applications.d.ts +2 -0
  23. package/dist/lib/transformers/Applications.js +110 -4
  24. package/dist/lib/transformers/AuditLogs.js +10 -10
  25. package/dist/lib/transformers/AutoModeration.js +6 -6
  26. package/dist/lib/transformers/Channels.js +16 -16
  27. package/dist/lib/transformers/Components.d.ts +3 -1
  28. package/dist/lib/transformers/Components.js +42 -16
  29. package/dist/lib/transformers/Entitlements.d.ts +2 -2
  30. package/dist/lib/transformers/Entitlements.js +16 -16
  31. package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
  32. package/dist/lib/transformers/GuildTemplates.js +4 -4
  33. package/dist/lib/transformers/Guilds.js +28 -28
  34. package/dist/lib/transformers/Interactions.js +74 -44
  35. package/dist/lib/transformers/Lobbies.js +2 -2
  36. package/dist/lib/transformers/Messages.js +18 -18
  37. package/dist/lib/transformers/Polls.js +2 -2
  38. package/dist/lib/transformers/Presences.d.ts +3 -3
  39. package/dist/lib/transformers/Presences.js +6 -6
  40. package/dist/lib/transformers/Roles.js +6 -6
  41. package/dist/lib/transformers/SKUs.js +2 -2
  42. package/dist/lib/transformers/Soundboards.js +6 -6
  43. package/dist/lib/transformers/StageInstances.js +6 -6
  44. package/dist/lib/transformers/Stickers.js +3 -3
  45. package/dist/lib/transformers/Subscriptions.js +8 -8
  46. package/dist/lib/transformers/Teams.js +4 -4
  47. package/dist/lib/transformers/Users.js +6 -6
  48. package/dist/lib/transformers/Voice.js +8 -8
  49. package/dist/lib/transformers/Webhooks.js +6 -6
  50. package/dist/lib/types/application-command.d.ts +9 -4
  51. package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
  52. package/dist/lib/types/application.d.ts +12 -7
  53. package/dist/lib/types/audit-log.d.ts +9 -5
  54. package/dist/lib/types/auto-moderation.d.ts +7 -3
  55. package/dist/lib/types/channel.d.ts +17 -23
  56. package/dist/lib/types/common.d.ts +2 -0
  57. package/dist/lib/types/components.d.ts +79 -19
  58. package/dist/lib/types/emoji.d.ts +1 -0
  59. package/dist/lib/types/entitlements.d.ts +5 -4
  60. package/dist/lib/types/gateway-events.d.ts +387 -210
  61. package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
  62. package/dist/lib/types/guild-template.d.ts +3 -2
  63. package/dist/lib/types/guild.d.ts +33 -17
  64. package/dist/lib/types/interaction.d.ts +26 -13
  65. package/dist/lib/types/invite.d.ts +3 -0
  66. package/dist/lib/types/lobby.d.ts +3 -1
  67. package/dist/lib/types/message.d.ts +29 -15
  68. package/dist/lib/types/poll.d.ts +7 -1
  69. package/dist/lib/types/role.d.ts +6 -3
  70. package/dist/lib/types/sku.d.ts +2 -1
  71. package/dist/lib/types/soundboard.d.ts +4 -3
  72. package/dist/lib/types/stage-instance.d.ts +4 -3
  73. package/dist/lib/types/sticker.d.ts +8 -5
  74. package/dist/lib/types/subscription.d.ts +6 -5
  75. package/dist/lib/types/team.d.ts +4 -2
  76. package/dist/lib/types/user.d.ts +10 -3
  77. package/dist/lib/types/voice.d.ts +6 -4
  78. package/dist/lib/types/webhook.d.ts +4 -3
  79. package/dist/lib/utils/CDN.d.ts +22 -22
  80. package/dist/lib/utils/CDN.js +22 -22
  81. package/dist/lib/utils/errors.d.ts +3 -1
  82. package/dist/lib/utils/errors.js +4 -0
  83. package/dist/lib/utils/formatters.d.ts +6 -6
  84. package/dist/lib/utils/formatters.js +27 -28
  85. package/dist/lib/utils/index.d.ts +1 -0
  86. package/dist/lib/utils/index.js +18 -7
  87. package/dist/lib/utils/permissions.d.ts +2 -0
  88. package/dist/lib/utils/permissions.js +7 -0
  89. package/dist/package.json +1 -1
  90. package/package.json +2 -2
  91. package/dist/lib/types/message-components.d.ts +0 -450
  92. package/dist/lib/types/message-components.js +0 -2
@@ -195,7 +195,7 @@ class Messages {
195
195
  static messageFromRaw(message) {
196
196
  return {
197
197
  id: message.id,
198
- channelID: message.channel_id,
198
+ channelId: message.channel_id,
199
199
  author: Users_1.Users.userFromRaw(message.author),
200
200
  content: message.content,
201
201
  timestamp: message.timestamp,
@@ -206,7 +206,7 @@ class Messages {
206
206
  mentionRoles: message.mention_roles,
207
207
  mentionChannels: message.mention_channels?.map((channelMention) => ({
208
208
  id: channelMention.id,
209
- guildID: channelMention.guild_id,
209
+ guildId: channelMention.guild_id,
210
210
  type: channelMention.type,
211
211
  name: channelMention.name,
212
212
  })),
@@ -222,19 +222,19 @@ class Messages {
222
222
  })),
223
223
  nonce: message.nonce,
224
224
  pinned: message.pinned,
225
- webhookID: message.webhook_id,
225
+ webhookId: message.webhook_id,
226
226
  type: message.type,
227
227
  activity: message.activity,
228
228
  application: message.application !== undefined
229
- ? Applications_1.Applications.applicationFromRaw(message.application)
229
+ ? Applications_1.Applications.partialApplicationFromRaw(message.application)
230
230
  : undefined,
231
- applicationID: message.application_id,
231
+ applicationId: message.application_id,
232
232
  flags: message.flags,
233
233
  messageReference: message.message_reference !== undefined
234
234
  ? {
235
- messageID: message.message_reference.message_id,
236
- channelID: message.message_reference.channel_id,
237
- guildID: message.message_reference.guild_id,
235
+ messageId: message.message_reference.message_id,
236
+ channelId: message.message_reference.channel_id,
237
+ guildId: message.message_reference.guild_id,
238
238
  failIfNotExists: message.message_reference.fail_if_not_exists,
239
239
  }
240
240
  : undefined,
@@ -285,7 +285,7 @@ class Messages {
285
285
  position: message.position,
286
286
  roleSubscriptionData: message.role_subscription_data !== undefined
287
287
  ? {
288
- roleSubscriptionListingID: message.role_subscription_data.role_subscription_listing_id,
288
+ roleSubscriptionListingId: message.role_subscription_data.role_subscription_listing_id,
289
289
  tierName: message.role_subscription_data.tier_name,
290
290
  totalMonthsSubscribed: message.role_subscription_data.total_months_subscribed,
291
291
  isRenewal: message.role_subscription_data.is_renewal,
@@ -303,7 +303,7 @@ class Messages {
303
303
  static messageToRaw(message) {
304
304
  return {
305
305
  id: message.id,
306
- channel_id: message.channelID,
306
+ channel_id: message.channelId,
307
307
  author: Users_1.Users.userToRaw(message.author),
308
308
  content: message.content,
309
309
  timestamp: message.timestamp,
@@ -314,7 +314,7 @@ class Messages {
314
314
  mention_roles: message.mentionRoles,
315
315
  mention_channels: message.mentionChannels?.map((channelMention) => ({
316
316
  id: channelMention.id,
317
- guild_id: channelMention.guildID,
317
+ guild_id: channelMention.guildId,
318
318
  type: channelMention.type,
319
319
  name: channelMention.name,
320
320
  })),
@@ -330,19 +330,19 @@ class Messages {
330
330
  })),
331
331
  nonce: message.nonce,
332
332
  pinned: message.pinned,
333
- webhook_id: message.webhookID,
333
+ webhook_id: message.webhookId,
334
334
  type: message.type,
335
335
  activity: message.activity,
336
336
  application: message.application !== undefined
337
- ? Applications_1.Applications.applicationToRaw(message.application)
337
+ ? Applications_1.Applications.partialApplicationToRaw(message.application)
338
338
  : undefined,
339
- application_id: message.applicationID,
339
+ application_id: message.applicationId,
340
340
  flags: message.flags,
341
341
  message_reference: message.messageReference !== undefined
342
342
  ? {
343
- message_id: message.messageReference.messageID,
344
- channel_id: message.messageReference.channelID,
345
- guild_id: message.messageReference.guildID,
343
+ message_id: message.messageReference.messageId,
344
+ channel_id: message.messageReference.channelId,
345
+ guild_id: message.messageReference.guildId,
346
346
  fail_if_not_exists: message.messageReference.failIfNotExists,
347
347
  }
348
348
  : undefined,
@@ -393,7 +393,7 @@ class Messages {
393
393
  position: message.position,
394
394
  role_subscription_data: message.roleSubscriptionData !== undefined
395
395
  ? {
396
- role_subscription_listing_id: message.roleSubscriptionData.roleSubscriptionListingID,
396
+ role_subscription_listing_id: message.roleSubscriptionData.roleSubscriptionListingId,
397
397
  tier_name: message.roleSubscriptionData.tierName,
398
398
  total_months_subscribed: message.roleSubscriptionData.totalMonthsSubscribed,
399
399
  is_renewal: message.roleSubscriptionData.isRenewal,
@@ -6,7 +6,7 @@ class Polls {
6
6
  return {
7
7
  question: poll.question,
8
8
  answers: poll.answers.map((answer) => ({
9
- answerID: answer.answer_id,
9
+ answerId: answer.answer_id,
10
10
  pollMedia: answer.poll_media,
11
11
  })),
12
12
  expiry: poll.expiry,
@@ -28,7 +28,7 @@ class Polls {
28
28
  return {
29
29
  question: poll.question,
30
30
  answers: poll.answers.map((answer) => ({
31
- answer_id: answer.answerID,
31
+ answer_id: answer.answerId,
32
32
  poll_media: answer.pollMedia,
33
33
  })),
34
34
  expiry: poll.expiry,
@@ -1,5 +1,5 @@
1
- import type { RawPresenceUpdateEventFields, PresenceUpdateEventFields } from "../types/gateway-events";
1
+ import type { RawPresenceUpdateEvent, PresenceUpdateEvent } from "../types/gateway-events";
2
2
  export declare class Presences {
3
- static presenceFromRaw(presence: RawPresenceUpdateEventFields): PresenceUpdateEventFields;
4
- static presenceToRaw(presence: PresenceUpdateEventFields): RawPresenceUpdateEventFields;
3
+ static presenceFromRaw(presence: RawPresenceUpdateEvent): PresenceUpdateEvent;
4
+ static presenceToRaw(presence: PresenceUpdateEvent): RawPresenceUpdateEvent;
5
5
  }
@@ -25,12 +25,12 @@ class Presences {
25
25
  ? presence.user.avatar_decoration_data !== null
26
26
  ? {
27
27
  asset: presence.user.avatar_decoration_data.asset,
28
- skuID: presence.user.avatar_decoration_data.sku_id,
28
+ skuId: presence.user.avatar_decoration_data.sku_id,
29
29
  }
30
30
  : null
31
31
  : undefined,
32
32
  },
33
- guildID: presence.guild_id,
33
+ guildId: presence.guild_id,
34
34
  status: presence.status,
35
35
  activities: presence.activities.map((activity) => ({
36
36
  name: activity.name,
@@ -38,7 +38,7 @@ class Presences {
38
38
  url: activity.url,
39
39
  createdAt: activity.created_at,
40
40
  timestamps: activity.timestamps,
41
- applicationID: activity.application_id,
41
+ applicationId: activity.application_id,
42
42
  details: activity.details,
43
43
  state: activity.state,
44
44
  emoji: activity.emoji,
@@ -80,12 +80,12 @@ class Presences {
80
80
  ? presence.user.avatarDecorationData !== null
81
81
  ? {
82
82
  asset: presence.user.avatarDecorationData.asset,
83
- sku_id: presence.user.avatarDecorationData.skuID,
83
+ sku_id: presence.user.avatarDecorationData.skuId,
84
84
  }
85
85
  : null
86
86
  : undefined,
87
87
  },
88
- guild_id: presence.guildID,
88
+ guild_id: presence.guildId,
89
89
  status: presence.status,
90
90
  activities: presence.activities.map((activity) => ({
91
91
  name: activity.name,
@@ -93,7 +93,7 @@ class Presences {
93
93
  url: activity.url,
94
94
  created_at: activity.createdAt,
95
95
  timestamps: activity.timestamps,
96
- application_id: activity.applicationID,
96
+ application_id: activity.applicationId,
97
97
  details: activity.details,
98
98
  state: activity.state,
99
99
  emoji: activity.emoji,
@@ -21,10 +21,10 @@ class Roles {
21
21
  mentionable: role.mentionable,
22
22
  tags: role.tags !== undefined
23
23
  ? {
24
- botID: role.tags.bot_id,
25
- integrationID: role.tags.integration_id,
24
+ botId: role.tags.bot_id,
25
+ integrationId: role.tags.integration_id,
26
26
  premiumSubscriber: role.tags.premium_subscriber,
27
- subscriptionListingID: role.tags.subscription_listing_id,
27
+ subscriptionListingId: role.tags.subscription_listing_id,
28
28
  availableForPurchase: role.tags.available_for_purchase,
29
29
  guildConnections: role.tags.guild_connections,
30
30
  }
@@ -51,10 +51,10 @@ class Roles {
51
51
  mentionable: role.mentionable,
52
52
  tags: role.tags !== undefined
53
53
  ? {
54
- bot_id: role.tags.botID,
55
- integration_id: role.tags.integrationID,
54
+ bot_id: role.tags.botId,
55
+ integration_id: role.tags.integrationId,
56
56
  premium_subscriber: role.tags.premiumSubscriber,
57
- subscription_listing_id: role.tags.subscriptionListingID,
57
+ subscription_listing_id: role.tags.subscriptionListingId,
58
58
  available_for_purchase: role.tags.availableForPurchase,
59
59
  guild_connections: role.tags.guildConnections,
60
60
  }
@@ -6,7 +6,7 @@ class SKUs {
6
6
  return {
7
7
  id: sku.id,
8
8
  type: sku.type,
9
- applicationID: sku.application_id,
9
+ applicationId: sku.application_id,
10
10
  name: sku.name,
11
11
  slug: sku.slug,
12
12
  flags: sku.flags,
@@ -16,7 +16,7 @@ class SKUs {
16
16
  return {
17
17
  id: sku.id,
18
18
  type: sku.type,
19
- application_id: sku.applicationID,
19
+ application_id: sku.applicationId,
20
20
  name: sku.name,
21
21
  slug: sku.slug,
22
22
  flags: sku.flags,
@@ -6,11 +6,11 @@ class Soundboards {
6
6
  static soundboardSoundFromRaw(sound) {
7
7
  return {
8
8
  name: sound.name,
9
- soundID: sound.sound_id,
9
+ soundId: sound.sound_id,
10
10
  volume: sound.volume,
11
- emojiID: sound.emoji_id,
11
+ emojiId: sound.emoji_id,
12
12
  emojiName: sound.emoji_name,
13
- guildID: sound.guild_id,
13
+ guildId: sound.guild_id,
14
14
  available: sound.available,
15
15
  user: sound.user !== undefined ? Users_1.Users.userFromRaw(sound.user) : undefined,
16
16
  };
@@ -18,11 +18,11 @@ class Soundboards {
18
18
  static soundboardSoundToRaw(sound) {
19
19
  return {
20
20
  name: sound.name,
21
- sound_id: sound.soundID,
21
+ sound_id: sound.soundId,
22
22
  volume: sound.volume,
23
- emoji_id: sound.emojiID,
23
+ emoji_id: sound.emojiId,
24
24
  emoji_name: sound.emojiName,
25
- guild_id: sound.guildID,
25
+ guild_id: sound.guildId,
26
26
  available: sound.available,
27
27
  user: sound.user !== undefined ? Users_1.Users.userToRaw(sound.user) : undefined,
28
28
  };
@@ -5,23 +5,23 @@ class StageInstances {
5
5
  static stageInstanceFromRaw(stageInstance) {
6
6
  return {
7
7
  id: stageInstance.id,
8
- guildID: stageInstance.guild_id,
9
- channelID: stageInstance.channel_id,
8
+ guildId: stageInstance.guild_id,
9
+ channelId: stageInstance.channel_id,
10
10
  topic: stageInstance.topic,
11
11
  privacyLevel: stageInstance.privacy_level,
12
12
  discoverableDisabled: stageInstance.discoverable_disabled,
13
- guildScheduledEventID: stageInstance.guild_scheduled_event_id,
13
+ guildScheduledEventId: stageInstance.guild_scheduled_event_id,
14
14
  };
15
15
  }
16
16
  static stageInstanceToRaw(stageInstance) {
17
17
  return {
18
18
  id: stageInstance.id,
19
- guild_id: stageInstance.guildID,
20
- channel_id: stageInstance.channelID,
19
+ guild_id: stageInstance.guildId,
20
+ channel_id: stageInstance.channelId,
21
21
  topic: stageInstance.topic,
22
22
  privacy_level: stageInstance.privacyLevel,
23
23
  discoverable_disabled: stageInstance.discoverableDisabled,
24
- guild_scheduled_event_id: stageInstance.guildScheduledEventID,
24
+ guild_scheduled_event_id: stageInstance.guildScheduledEventId,
25
25
  };
26
26
  }
27
27
  }
@@ -6,14 +6,14 @@ class Stickers {
6
6
  static stickerFromRaw(sticker) {
7
7
  return {
8
8
  id: sticker.id,
9
- packID: sticker.pack_id,
9
+ packId: sticker.pack_id,
10
10
  name: sticker.name,
11
11
  description: sticker.description,
12
12
  tags: sticker.tags,
13
13
  type: sticker.type,
14
14
  formatType: sticker.format_type,
15
15
  available: sticker.available,
16
- guildID: sticker.id,
16
+ guildId: sticker.id,
17
17
  user: sticker.user !== undefined
18
18
  ? Users_1.Users.userFromRaw(sticker.user)
19
19
  : undefined,
@@ -23,7 +23,7 @@ class Stickers {
23
23
  static stickerToRaw(sticker) {
24
24
  return {
25
25
  id: sticker.id,
26
- pack_id: sticker.packID,
26
+ pack_id: sticker.packId,
27
27
  name: sticker.name,
28
28
  description: sticker.description,
29
29
  tags: sticker.tags,
@@ -5,10 +5,10 @@ class Subscriptions {
5
5
  static subscriptionFromRaw(subscription) {
6
6
  return {
7
7
  id: subscription.id,
8
- userID: subscription.user_id,
9
- skuIDs: subscription.sku_ids,
10
- entitlementIDs: subscription.entitlement_ids,
11
- renewalSKUIDs: subscription.renewal_sku_ids,
8
+ userId: subscription.user_id,
9
+ skuIds: subscription.sku_ids,
10
+ entitlementIds: subscription.entitlement_ids,
11
+ renewalSKUIds: subscription.renewal_sku_ids,
12
12
  currentPeriodStart: subscription.current_period_start,
13
13
  currentPeriodEnd: subscription.current_period_end,
14
14
  status: subscription.status,
@@ -19,10 +19,10 @@ class Subscriptions {
19
19
  static subscriptionToRaw(subscription) {
20
20
  return {
21
21
  id: subscription.id,
22
- user_id: subscription.userID,
23
- sku_ids: subscription.skuIDs,
24
- entitlement_ids: subscription.entitlementIDs,
25
- renewal_sku_ids: subscription.renewalSKUIDs,
22
+ user_id: subscription.userId,
23
+ sku_ids: subscription.skuIds,
24
+ entitlement_ids: subscription.entitlementIds,
25
+ renewal_sku_ids: subscription.renewalSKUIds,
26
26
  current_period_start: subscription.currentPeriodStart,
27
27
  current_period_end: subscription.currentPeriodEnd,
28
28
  status: subscription.status,
@@ -9,12 +9,12 @@ class Teams {
9
9
  id: team.id,
10
10
  members: team.members.map((teamMember) => ({
11
11
  membershipState: teamMember.membership_state,
12
- teamID: teamMember.team_id,
12
+ teamId: teamMember.team_id,
13
13
  user: Users_1.Users.userFromRaw(teamMember.user),
14
14
  role: teamMember.role,
15
15
  })),
16
16
  name: team.name,
17
- ownerUserID: team.owner_user_id,
17
+ ownerUserId: team.owner_user_id,
18
18
  };
19
19
  }
20
20
  static teamToRaw(team) {
@@ -23,12 +23,12 @@ class Teams {
23
23
  id: team.id,
24
24
  members: team.members.map((teamMember) => ({
25
25
  membership_state: teamMember.membershipState,
26
- team_id: teamMember.teamID,
26
+ team_id: teamMember.teamId,
27
27
  user: Users_1.Users.userToRaw(teamMember.user),
28
28
  role: teamMember.role,
29
29
  })),
30
30
  name: team.name,
31
- owner_user_id: team.ownerUserID,
31
+ owner_user_id: team.ownerUserId,
32
32
  };
33
33
  }
34
34
  }
@@ -4,7 +4,7 @@ exports.Users = void 0;
4
4
  class Users {
5
5
  static nameplateFromRaw(nameplate) {
6
6
  return {
7
- skuID: nameplate.sku_id,
7
+ skuId: nameplate.sku_id,
8
8
  asset: nameplate.asset,
9
9
  label: nameplate.label,
10
10
  palette: nameplate.palette,
@@ -12,7 +12,7 @@ class Users {
12
12
  }
13
13
  static nameplateToRaw(nameplate) {
14
14
  return {
15
- sku_id: nameplate.skuID,
15
+ sku_id: nameplate.skuId,
16
16
  asset: nameplate.asset,
17
17
  label: nameplate.label,
18
18
  palette: nameplate.palette,
@@ -40,7 +40,7 @@ class Users {
40
40
  ? user.avatar_decoration_data !== null
41
41
  ? {
42
42
  asset: user.avatar_decoration_data.asset,
43
- skuID: user.avatar_decoration_data.sku_id,
43
+ skuId: user.avatar_decoration_data.sku_id,
44
44
  }
45
45
  : null
46
46
  : undefined,
@@ -56,7 +56,7 @@ class Users {
56
56
  primaryGuild: user.primary_guild !== undefined
57
57
  ? user.primary_guild !== null
58
58
  ? {
59
- identityGuildID: user.primary_guild.identity_guild_id,
59
+ identityGuildId: user.primary_guild.identity_guild_id,
60
60
  identityEnabled: user.primary_guild.identity_enabled,
61
61
  tag: user.primary_guild.tag,
62
62
  badge: user.primary_guild.badge,
@@ -87,7 +87,7 @@ class Users {
87
87
  ? user.avatarDecorationData !== null
88
88
  ? {
89
89
  asset: user.avatarDecorationData.asset,
90
- sku_id: user.avatarDecorationData.skuID,
90
+ sku_id: user.avatarDecorationData.skuId,
91
91
  }
92
92
  : null
93
93
  : undefined,
@@ -103,7 +103,7 @@ class Users {
103
103
  primary_guild: user.primaryGuild !== undefined
104
104
  ? user.primaryGuild !== null
105
105
  ? {
106
- identity_guild_id: user.primaryGuild.identityGuildID,
106
+ identity_guild_id: user.primaryGuild.identityGuildId,
107
107
  identity_enabled: user.primaryGuild.identityEnabled,
108
108
  tag: user.primaryGuild.tag,
109
109
  badge: user.primaryGuild.badge,
@@ -5,13 +5,13 @@ const Guilds_1 = require("./Guilds");
5
5
  class Voice {
6
6
  static voiceStateFromRaw(voiceState) {
7
7
  return {
8
- guildID: voiceState.guild_id,
9
- channelID: voiceState.channel_id,
10
- userID: voiceState.user_id,
8
+ guildId: voiceState.guild_id,
9
+ channelId: voiceState.channel_id,
10
+ userId: voiceState.user_id,
11
11
  member: voiceState.member !== undefined
12
12
  ? Guilds_1.Guilds.guildMemberFromRaw(voiceState.member)
13
13
  : undefined,
14
- sessionID: voiceState.session_id,
14
+ sessionId: voiceState.session_id,
15
15
  deaf: voiceState.deaf,
16
16
  mute: voiceState.mute,
17
17
  selfDeaf: voiceState.self_deaf,
@@ -24,13 +24,13 @@ class Voice {
24
24
  }
25
25
  static voiceStateToRaw(voiceState) {
26
26
  return {
27
- guild_id: voiceState.guildID,
28
- channel_id: voiceState.channelID,
29
- user_id: voiceState.userID,
27
+ guild_id: voiceState.guildId,
28
+ channel_id: voiceState.channelId,
29
+ user_id: voiceState.userId,
30
30
  member: voiceState.member !== undefined
31
31
  ? Guilds_1.Guilds.guildMemberToRaw(voiceState.member)
32
32
  : undefined,
33
- session_id: voiceState.sessionID,
33
+ session_id: voiceState.sessionId,
34
34
  deaf: voiceState.deaf,
35
35
  mute: voiceState.mute,
36
36
  self_deaf: voiceState.selfDeaf,
@@ -9,15 +9,15 @@ class Webhooks {
9
9
  return {
10
10
  id: webhook.id,
11
11
  type: webhook.type,
12
- guildID: webhook.guild_id,
13
- channelID: webhook.channel_id,
12
+ guildId: webhook.guild_id,
13
+ channelId: webhook.channel_id,
14
14
  user: webhook.user !== undefined
15
15
  ? Users_1.Users.userFromRaw(webhook.user)
16
16
  : undefined,
17
17
  name: webhook.name,
18
18
  avatar: webhook.avatar,
19
19
  token: webhook.token,
20
- applicationID: webhook.application_id,
20
+ applicationId: webhook.application_id,
21
21
  sourceGuild: webhook.source_guild !== undefined
22
22
  ? Guilds_1.Guilds.guildFromRaw(webhook.source_guild)
23
23
  : undefined,
@@ -31,13 +31,13 @@ class Webhooks {
31
31
  return {
32
32
  id: webhook.id,
33
33
  type: webhook.type,
34
- guild_id: webhook.guildID,
35
- channel_id: webhook.channelID,
34
+ guild_id: webhook.guildId,
35
+ channel_id: webhook.channelId,
36
36
  user: webhook.user !== undefined ? Users_1.Users.userToRaw(webhook.user) : undefined,
37
37
  name: webhook.name,
38
38
  avatar: webhook.avatar,
39
39
  token: webhook.token,
40
- application_id: webhook.applicationID,
40
+ application_id: webhook.applicationId,
41
41
  source_guild: webhook.sourceGuild !== undefined
42
42
  ? Guilds_1.Guilds.guildToRaw(webhook.sourceGuild)
43
43
  : undefined,
@@ -56,11 +56,12 @@ export interface RawApplicationCommandPermission {
56
56
  type: ApplicationCommandPermissionType;
57
57
  permission: boolean;
58
58
  }
59
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure */
59
60
  export interface ApplicationCommand {
60
61
  id: snowflake;
61
62
  type?: ApplicationCommandTypes;
62
- applicationID: snowflake;
63
- guildID?: snowflake;
63
+ applicationId: snowflake;
64
+ guildId?: snowflake;
64
65
  name: string;
65
66
  nameLocalizations?: LocaleMap | null;
66
67
  description: string;
@@ -75,6 +76,7 @@ export interface ApplicationCommand {
75
76
  version: string;
76
77
  handler?: EntryPointCommandHandlerTypes;
77
78
  }
79
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure */
78
80
  export interface ApplicationCommandOption {
79
81
  type: ApplicationCommandOptionType;
80
82
  name: string;
@@ -91,17 +93,20 @@ export interface ApplicationCommandOption {
91
93
  maxLength?: number;
92
94
  autocomplete?: boolean;
93
95
  }
96
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
94
97
  export interface ApplicationCommandOptionChoice {
95
98
  name: string;
96
99
  nameLocalizations?: LocaleMap | null;
97
100
  value: string;
98
101
  }
102
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure */
99
103
  export interface GuildApplicationCommandPermissions {
100
104
  id: snowflake;
101
- applicationID: snowflake;
102
- guildID: snowflake;
105
+ applicationId: snowflake;
106
+ guildId: snowflake;
103
107
  permissions: Array<ApplicationCommandPermission>;
104
108
  }
109
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure */
105
110
  export interface ApplicationCommandPermission {
106
111
  id: snowflake;
107
112
  type: ApplicationCommandPermissionType;
@@ -9,6 +9,7 @@ export interface RawApplicationRoleConnectionMetadata {
9
9
  description: string;
10
10
  description_localizations?: LocaleMap | null;
11
11
  }
12
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure */
12
13
  export interface ApplicationRoleConnectionMetadata {
13
14
  type: ApplicationRoleConnectionMetadataType;
14
15
  key: string;
@@ -61,6 +61,7 @@ export interface RawActivityLocation {
61
61
  channel_id: snowflake;
62
62
  guild_id?: snowflake | null;
63
63
  }
64
+ /** https://discord.com/developers/docs/resources/application#application-object-application-structure */
64
65
  export interface Application {
65
66
  id: snowflake;
66
67
  name: string;
@@ -74,9 +75,9 @@ export interface Application {
74
75
  owner?: User;
75
76
  verifyKey: string;
76
77
  team: Team | null;
77
- guildID?: snowflake;
78
+ guildId?: snowflake;
78
79
  guild?: Guild;
79
- primarySKUID?: snowflake;
80
+ primarySKUId?: snowflake;
80
81
  slug?: string;
81
82
  coverImage?: string;
82
83
  flags?: ApplicationFlags;
@@ -94,23 +95,27 @@ export interface Application {
94
95
  integrationTypesConfig?: Record<ApplicationIntegrationTypes, ApplicationIntegrationTypeConfiguration>;
95
96
  customInstallURL?: string;
96
97
  }
98
+ /** https://discord.com/developers/docs/resources/application#application-object-application-integration-type-configuration-object */
97
99
  export interface ApplicationIntegrationTypeConfiguration {
98
100
  oauth2InstallParams: InstallParams;
99
101
  }
102
+ /** https://discord.com/developers/docs/resources/application#install-params-object-install-params-structure */
100
103
  export interface InstallParams {
101
104
  scopes: Array<OAuth2Scopes>;
102
105
  permissions: string;
103
106
  }
107
+ /** https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object */
104
108
  export interface ActivityInstance {
105
- applicationID: snowflake;
106
- instanceID: string;
107
- launchID: snowflake;
109
+ applicationId: snowflake;
110
+ instanceId: string;
111
+ launchId: snowflake;
108
112
  location: ActivityLocation;
109
113
  users: Array<snowflake>;
110
114
  }
115
+ /** https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object */
111
116
  export interface ActivityLocation {
112
117
  id: string;
113
118
  kind: ActivityLocationKind;
114
- channelID: snowflake;
115
- guildID?: snowflake | null;
119
+ channelId: snowflake;
120
+ guildId?: snowflake | null;
116
121
  }
@@ -49,6 +49,7 @@ export interface RawAuditLogChange {
49
49
  old_value?: any;
50
50
  key: string;
51
51
  }
52
+ /** https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure */
52
53
  export interface AuditLog {
53
54
  applicationCommands: Array<ApplicationCommand>;
54
55
  auditLogEntries: Array<AuditLogEntry>;
@@ -59,29 +60,32 @@ export interface AuditLog {
59
60
  users: Array<User>;
60
61
  webhooks: Array<Webhook>;
61
62
  }
63
+ /** https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure */
62
64
  export interface AuditLogEntry {
63
- targetID: snowflake | null;
65
+ targetId: snowflake | null;
64
66
  changes?: Array<AuditLogChange>;
65
- userID: snowflake | null;
67
+ userId: snowflake | null;
66
68
  id: snowflake;
67
69
  actionType: AuditLogEvents;
68
70
  options?: OptionalAuditLogEntryInfo;
69
71
  reason?: string;
70
72
  }
73
+ /** https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info */
71
74
  export interface OptionalAuditLogEntryInfo {
72
- applicationID: snowflake;
75
+ applicationId: snowflake;
73
76
  autoModerationRuleName: string;
74
77
  autoModerationRuleTriggerType: string;
75
- channelID: snowflake;
78
+ channelId: snowflake;
76
79
  count: string;
77
80
  deleteMemberDays: string;
78
81
  id: snowflake;
79
82
  membersRemoved: string;
80
- messageID: snowflake;
83
+ messageId: snowflake;
81
84
  roleName: string;
82
85
  type: string;
83
86
  integrationType: string;
84
87
  }
88
+ /** https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure */
85
89
  export interface AuditLogChange {
86
90
  newValue?: any;
87
91
  oldValue?: any;