disgroove 2.2.0 → 2.2.1-dev.00fb25f

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 (50) hide show
  1. package/dist/lib/Client.d.ts +226 -227
  2. package/dist/lib/Client.js +413 -415
  3. package/dist/lib/constants.d.ts +5 -4
  4. package/dist/lib/constants.js +5 -4
  5. package/dist/lib/gateway/Shard.d.ts +16 -9
  6. package/dist/lib/gateway/Shard.js +181 -112
  7. package/dist/lib/gateway/ShardManager.d.ts +6 -1
  8. package/dist/lib/gateway/ShardManager.js +6 -0
  9. package/dist/lib/index.d.ts +1 -0
  10. package/dist/lib/index.js +1 -0
  11. package/dist/lib/rest/CDN.d.ts +20 -20
  12. package/dist/lib/rest/CDN.js +20 -20
  13. package/dist/lib/rest/Endpoints.d.ts +81 -81
  14. package/dist/lib/rest/Endpoints.js +91 -91
  15. package/dist/lib/rest/RequestManager.js +2 -2
  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 +164 -67
  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/utils/errors.d.ts +8 -2
  42. package/dist/lib/utils/errors.js +36 -4
  43. package/dist/lib/voice/VoiceConnection.d.ts +57 -0
  44. package/dist/lib/voice/VoiceConnection.js +150 -0
  45. package/dist/lib/voice/VoiceConnectionManager.d.ts +19 -0
  46. package/dist/lib/voice/VoiceConnectionManager.js +66 -0
  47. package/dist/lib/voice/index.d.ts +2 -0
  48. package/dist/lib/voice/index.js +18 -0
  49. package/dist/package.json +1 -1
  50. package/package.json +1 -1
@@ -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;