disgroove 2.2.1-dev.d0eed5e → 2.2.1

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 (48) hide show
  1. package/README.md +3 -1
  2. package/dist/lib/Client.d.ts +222 -220
  3. package/dist/lib/Client.js +412 -415
  4. package/dist/lib/constants.d.ts +4 -4
  5. package/dist/lib/constants.js +4 -4
  6. package/dist/lib/gateway/Shard.d.ts +4 -2
  7. package/dist/lib/gateway/Shard.js +94 -74
  8. package/dist/lib/gateway/ShardManager.d.ts +6 -1
  9. package/dist/lib/gateway/ShardManager.js +6 -0
  10. package/dist/lib/index.d.ts +1 -0
  11. package/dist/lib/index.js +1 -0
  12. package/dist/lib/rest/CDN.d.ts +20 -20
  13. package/dist/lib/rest/CDN.js +20 -20
  14. package/dist/lib/rest/Endpoints.d.ts +81 -81
  15. package/dist/lib/rest/Endpoints.js +91 -91
  16. package/dist/lib/types/application-command.d.ts +4 -4
  17. package/dist/lib/types/application.d.ts +2 -2
  18. package/dist/lib/types/audit-log.d.ts +5 -5
  19. package/dist/lib/types/auto-moderation.d.ts +3 -3
  20. package/dist/lib/types/channel.d.ts +23 -21
  21. package/dist/lib/types/entitlements.d.ts +6 -6
  22. package/dist/lib/types/gateway-events.d.ts +83 -70
  23. package/dist/lib/types/guild-scheduled-event.d.ts +5 -5
  24. package/dist/lib/types/guild-template.d.ts +2 -2
  25. package/dist/lib/types/guild.d.ts +17 -17
  26. package/dist/lib/types/interaction.d.ts +8 -8
  27. package/dist/lib/types/message-components.d.ts +4 -4
  28. package/dist/lib/types/poll.d.ts +1 -1
  29. package/dist/lib/types/role.d.ts +3 -3
  30. package/dist/lib/types/sku.d.ts +2 -2
  31. package/dist/lib/types/stage-instance.d.ts +3 -3
  32. package/dist/lib/types/sticker.d.ts +5 -5
  33. package/dist/lib/types/team.d.ts +2 -2
  34. package/dist/lib/types/user.d.ts +1 -1
  35. package/dist/lib/types/voice-connections.d.ts +64 -0
  36. package/dist/lib/types/voice-connections.js +2 -0
  37. package/dist/lib/types/voice.d.ts +4 -4
  38. package/dist/lib/types/webhook.d.ts +3 -3
  39. package/dist/lib/utils/Util.d.ts +2 -2
  40. package/dist/lib/utils/Util.js +195 -193
  41. package/dist/lib/voice/VoiceConnection.d.ts +57 -0
  42. package/dist/lib/voice/VoiceConnection.js +150 -0
  43. package/dist/lib/voice/VoiceConnectionManager.d.ts +19 -0
  44. package/dist/lib/voice/VoiceConnectionManager.js +66 -0
  45. package/dist/lib/voice/index.d.ts +2 -0
  46. package/dist/lib/voice/index.js +18 -0
  47. package/dist/package.json +3 -3
  48. package/package.json +3 -3
@@ -186,13 +186,13 @@ export interface Guild {
186
186
  splash: string | null;
187
187
  discoverySplash: string | null;
188
188
  owner?: boolean;
189
- ownerId: snowflake;
189
+ ownerID: snowflake;
190
190
  permissions?: string;
191
191
  region?: string | null;
192
- afkChannelId: snowflake | null;
192
+ afkChannelID: snowflake | null;
193
193
  afkTimeout: number;
194
194
  widgetEnabled?: boolean;
195
- widgetChannelId?: snowflake | null;
195
+ widgetChannelID?: snowflake | null;
196
196
  verificationLevel: VerificationLevel;
197
197
  defaultMessageNotifications: DefaultMessageNotificationLevel;
198
198
  explicitContentFilter: ExplicitContentFilterLevel;
@@ -200,10 +200,10 @@ export interface Guild {
200
200
  emojis: Array<Emoji>;
201
201
  features: Array<GuildFeatures>;
202
202
  mfaLevel: MFALevel;
203
- applicationId: snowflake | null;
204
- systemChannelId: snowflake | null;
203
+ applicationID: snowflake | null;
204
+ systemChannelID: snowflake | null;
205
205
  systemChannelFlags: SystemChannelFlags;
206
- rulesChannelId: snowflake | null;
206
+ rulesChannelID: snowflake | null;
207
207
  maxPresences?: number | null;
208
208
  maxMembers?: number;
209
209
  vanityURLCode: string | null;
@@ -212,7 +212,7 @@ export interface Guild {
212
212
  premiumTier: PremiumTier;
213
213
  premiumSubscriptionCount?: number;
214
214
  preferredLocale: string;
215
- publicUpdatesChannelId: snowflake | null;
215
+ publicUpdatesChannelID: snowflake | null;
216
216
  maxVideoChannelUsers?: number;
217
217
  maxStageVideoChannelUsers?: number;
218
218
  approximateMemberCount?: number;
@@ -221,7 +221,7 @@ export interface Guild {
221
221
  nsfwLevel: GuildNSFWLevel;
222
222
  stickers?: Array<Sticker>;
223
223
  premiumProgressBarEnabled: boolean;
224
- safetyAlertsChannelId: snowflake | null;
224
+ safetyAlertsChannelID: snowflake | null;
225
225
  }
226
226
  export interface UnavailableGuild {
227
227
  id: snowflake;
@@ -242,7 +242,7 @@ export interface GuildPreview {
242
242
  }
243
243
  export interface GuildWidgetSettings {
244
244
  enabled: boolean;
245
- channelId: snowflake | null;
245
+ channelID: snowflake | null;
246
246
  }
247
247
  export interface GuildWidget {
248
248
  id: snowflake;
@@ -272,7 +272,7 @@ export interface Integration {
272
272
  type: string;
273
273
  enabled: boolean;
274
274
  syncing?: boolean;
275
- roleId?: snowflake;
275
+ roleID?: snowflake;
276
276
  enableEmoticons?: boolean;
277
277
  expireBehavior?: IntegrationExpireBehaviors;
278
278
  expireGracePeriod?: number;
@@ -304,15 +304,15 @@ export interface WelcomeScreen {
304
304
  welcomeChannels: Array<WelcomeScreenChannel>;
305
305
  }
306
306
  export interface WelcomeScreenChannel {
307
- channelId: snowflake;
307
+ channelID: snowflake;
308
308
  description: string;
309
- emojiId: snowflake | null;
309
+ emojiID: snowflake | null;
310
310
  emojiName: string | null;
311
311
  }
312
312
  export interface GuildOnboarding {
313
- guildId: snowflake;
313
+ guildID: snowflake;
314
314
  prompts: Array<OnboardingPrompt>;
315
- defaultChannelIds: Array<snowflake>;
315
+ defaultChannelIDs: Array<snowflake>;
316
316
  enabled: boolean;
317
317
  mode: OnboardingMode;
318
318
  }
@@ -327,10 +327,10 @@ export interface OnboardingPrompt {
327
327
  }
328
328
  export interface PromptOption {
329
329
  id: snowflake;
330
- channelIds: Array<snowflake>;
331
- roleIds: Array<snowflake>;
330
+ channelIDs: Array<snowflake>;
331
+ roleIDs: Array<snowflake>;
332
332
  emoji?: Emoji;
333
- emojiId?: snowflake;
333
+ emojiID?: snowflake;
334
334
  emojiName?: string;
335
335
  emojiAnimated?: boolean;
336
336
  title: string;
@@ -105,15 +105,15 @@ export interface RawInteractionCallbackData {
105
105
  }
106
106
  export interface Interaction {
107
107
  id: snowflake;
108
- applicationId: snowflake;
108
+ applicationID: snowflake;
109
109
  type: InteractionType;
110
110
  data?: ApplicationCommandData & MessageComponentData & ModalSubmitData;
111
111
  guild?: {
112
112
  locale: Locales;
113
113
  } & Pick<Guild, "id" | "features">;
114
- guildId?: snowflake;
114
+ guildID?: snowflake;
115
115
  channel?: Channel;
116
- channelId?: snowflake;
116
+ channelID?: snowflake;
117
117
  member?: GuildMember;
118
118
  user?: User;
119
119
  token: string;
@@ -132,17 +132,17 @@ export interface ApplicationCommandData {
132
132
  type: ApplicationCommandTypes;
133
133
  resolved?: ResolvedData;
134
134
  options?: Array<ApplicationCommandInteractionDataOption>;
135
- guildId?: snowflake;
136
- targetId?: snowflake;
135
+ guildID?: snowflake;
136
+ targetID?: snowflake;
137
137
  }
138
138
  export interface MessageComponentData {
139
- customId: string;
139
+ customID: string;
140
140
  componentType: ComponentTypes;
141
141
  values?: Array<string>;
142
142
  resolved?: ResolvedData;
143
143
  }
144
144
  export interface ModalSubmitData {
145
- customId: string;
145
+ customID: string;
146
146
  components: Array<{
147
147
  type: ComponentTypes.ActionRow;
148
148
  components: Array<TextInput>;
@@ -185,6 +185,6 @@ export interface InteractionCallbackData {
185
185
  poll?: PollCreateParams;
186
186
  files?: Array<File>;
187
187
  choices?: Array<ApplicationCommandOptionChoice>;
188
- customId?: string;
188
+ customID?: string;
189
189
  title?: string;
190
190
  }
@@ -59,14 +59,14 @@ export interface Button {
59
59
  style: ButtonStyles;
60
60
  label?: string;
61
61
  emoji?: Pick<Emoji, "name" | "id" | "animated">;
62
- customId?: string;
63
- skuId?: snowflake;
62
+ customID?: string;
63
+ skuID?: snowflake;
64
64
  url?: string;
65
65
  disabled?: boolean;
66
66
  }
67
67
  export interface SelectMenu {
68
68
  type: ComponentTypes.ChannelSelect | ComponentTypes.MentionableSelect | ComponentTypes.RoleSelect | ComponentTypes.StringSelect | ComponentTypes.UserSelect;
69
- customId: string;
69
+ customID: string;
70
70
  options?: Array<SelectOption>;
71
71
  channelTypes?: Array<ChannelTypes>;
72
72
  placeholder?: string;
@@ -88,7 +88,7 @@ export interface DefaultValue {
88
88
  }
89
89
  export interface TextInput {
90
90
  type: ComponentTypes.TextInput;
91
- customId: string;
91
+ customID: string;
92
92
  style: TextInputStyles;
93
93
  label: string;
94
94
  minLength?: number;
@@ -58,7 +58,7 @@ export interface PollMedia {
58
58
  emoji?: Pick<Emoji, "id" | "name">;
59
59
  }
60
60
  export interface PollAnswer {
61
- answerId: number;
61
+ answerID: number;
62
62
  pollMedia: PollMedia;
63
63
  }
64
64
  export interface PollResults {
@@ -39,10 +39,10 @@ export interface Role {
39
39
  flags: RoleFlags;
40
40
  }
41
41
  export interface RoleTags {
42
- botId?: snowflake;
43
- integrationId?: snowflake;
42
+ botID?: snowflake;
43
+ integrationID?: snowflake;
44
44
  premiumSubscriber?: null;
45
- subscriptionListingId?: snowflake;
45
+ subscriptionListingID?: snowflake;
46
46
  availableForPurchase?: null;
47
47
  guildConnections?: null;
48
48
  }
@@ -18,8 +18,8 @@ export interface RawSKU {
18
18
  export interface SKU {
19
19
  id: snowflake;
20
20
  type: SKUTypes;
21
- dependentSKUId?: string | null;
22
- applicationId: snowflake;
21
+ dependentSKUID?: string | null;
22
+ applicationID: snowflake;
23
23
  manifestLabels?: null;
24
24
  accessType?: number;
25
25
  name: string;
@@ -12,10 +12,10 @@ export interface RawStageInstance {
12
12
  }
13
13
  export interface StageInstance {
14
14
  id: snowflake;
15
- guildId: snowflake;
16
- channelId: snowflake;
15
+ guildID: snowflake;
16
+ channelID: snowflake;
17
17
  topic: string;
18
18
  privacyLevel: PrivacyLevel;
19
19
  discoverableDisabled: boolean;
20
- guildScheduledEventId: snowflake | null;
20
+ guildScheduledEventID: snowflake | null;
21
21
  }
@@ -34,7 +34,7 @@ export interface RawStickerPack {
34
34
  }
35
35
  export interface Sticker {
36
36
  id: snowflake;
37
- packId?: snowflake;
37
+ packID?: snowflake;
38
38
  name: string;
39
39
  description: string | null;
40
40
  tags: string;
@@ -42,7 +42,7 @@ export interface Sticker {
42
42
  type: StickerTypes;
43
43
  formatType: StickerFormatTypes;
44
44
  available?: boolean;
45
- guildId?: snowflake;
45
+ guildID?: snowflake;
46
46
  user?: User;
47
47
  sortValue?: number;
48
48
  }
@@ -55,8 +55,8 @@ export interface StickerPack {
55
55
  id: snowflake;
56
56
  stickers: Array<Sticker>;
57
57
  name: string;
58
- skuId: snowflake;
59
- coverStickerId?: snowflake;
58
+ skuID: snowflake;
59
+ coverStickerID?: snowflake;
60
60
  description: string;
61
- bannerAssetId?: snowflake;
61
+ bannerAssetID?: snowflake;
62
62
  }
@@ -21,11 +21,11 @@ export interface Team {
21
21
  id: snowflake;
22
22
  members: Array<TeamMember>;
23
23
  name: string;
24
- ownerUserId: snowflake;
24
+ ownerUserID: snowflake;
25
25
  }
26
26
  export interface TeamMember {
27
27
  membershipState: number;
28
- teamId: snowflake;
28
+ teamID: snowflake;
29
29
  user: User;
30
30
  role: TeamMemberRoleTypes;
31
31
  }
@@ -67,7 +67,7 @@ export interface User {
67
67
  }
68
68
  export interface AvatarDecorationData {
69
69
  asset: string;
70
- skuId: snowflake;
70
+ skuID: snowflake;
71
71
  }
72
72
  export interface Connection {
73
73
  id: snowflake;
@@ -0,0 +1,64 @@
1
+ import type { snowflake } from "./common";
2
+ /** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection-example-voice-identify-payload */
3
+ export interface RawVoiceIdentifyPayload {
4
+ server_id: snowflake;
5
+ user_id: snowflake;
6
+ session_id: string;
7
+ token: string;
8
+ }
9
+ /** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection-example-voice-ready-payload */
10
+ export interface RawVoiceReadyPayload {
11
+ ssrc: number;
12
+ ip: string;
13
+ port: number;
14
+ modes: Array<string>;
15
+ }
16
+ /** https://discord.com/developers/docs/topics/voice-connections#resuming-voice-connection-example-resume-connection-payload */
17
+ export interface RawResumeConnectionPayload {
18
+ server_id: snowflake;
19
+ session_id: string;
20
+ token: string;
21
+ }
22
+ /** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload */
23
+ export interface RawSelectProtocolPayload {
24
+ protocol: string;
25
+ data: {
26
+ address: string;
27
+ port: number;
28
+ mode: string;
29
+ };
30
+ }
31
+ /** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-session-description-payload */
32
+ export interface RawSessionDescriptionPayload {
33
+ mode: string;
34
+ secret_key: Array<number>;
35
+ }
36
+ export interface VoiceIdentifyPayload {
37
+ serverID: snowflake;
38
+ userID: snowflake;
39
+ sessionID: string;
40
+ token: string;
41
+ }
42
+ export interface VoiceReadyPayload {
43
+ ssrc: number;
44
+ ip: string;
45
+ port: number;
46
+ modes: Array<string>;
47
+ }
48
+ export interface ResumeConnectionPayload {
49
+ serverID: snowflake;
50
+ sessionID: string;
51
+ token: string;
52
+ }
53
+ export interface SelectProtocolPayload {
54
+ protocol: string;
55
+ data: {
56
+ address: string;
57
+ port: number;
58
+ mode: string;
59
+ };
60
+ }
61
+ export interface SessionDescriptionPayload {
62
+ mode: string;
63
+ secretKey: Array<number>;
64
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -25,11 +25,11 @@ export interface RawVoiceRegion {
25
25
  custom: boolean;
26
26
  }
27
27
  export interface VoiceState {
28
- guildId?: snowflake;
29
- channelId: snowflake | null;
30
- userId: snowflake;
28
+ guildID?: snowflake;
29
+ channelID: snowflake | null;
30
+ userID: snowflake;
31
31
  member?: GuildMember;
32
- sessionId: string;
32
+ sessionID: string;
33
33
  deaf: boolean;
34
34
  mute: boolean;
35
35
  selfDeaf: boolean;
@@ -21,13 +21,13 @@ export interface RawWebhook {
21
21
  export interface Webhook {
22
22
  id: snowflake;
23
23
  type: WebhookTypes;
24
- guildId?: snowflake | null;
25
- channelId: snowflake | null;
24
+ guildID?: snowflake | null;
25
+ channelID: snowflake | null;
26
26
  user?: User;
27
27
  name: string | null;
28
28
  avatar: string | null;
29
29
  token?: string;
30
- applicationId: snowflake | null;
30
+ applicationID: snowflake | null;
31
31
  sourceGuild?: Guild;
32
32
  sourceChannel?: Channel;
33
33
  url?: string;
@@ -83,8 +83,8 @@ export declare class Util {
83
83
  teamToRaw(team: Team): RawTeam;
84
84
  threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
85
85
  threadMemberToRaw(threadMember: ThreadMember): RawThreadMember;
86
- testEntitlementFromRaw(entitlement: Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">): Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionId">;
87
- testEntitlementToRaw(entitlement: Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionId">): Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">;
86
+ testEntitlementFromRaw(entitlement: Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">): Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionID">;
87
+ testEntitlementToRaw(entitlement: Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionID">): Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">;
88
88
  userFromRaw(user: RawUser): User;
89
89
  userToRaw(user: User): RawUser;
90
90
  voiceStateFromRaw(voiceState: RawVoiceState): VoiceState;