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.
- package/README.md +3 -1
- package/dist/lib/Client.d.ts +222 -220
- package/dist/lib/Client.js +412 -415
- package/dist/lib/constants.d.ts +4 -4
- package/dist/lib/constants.js +4 -4
- package/dist/lib/gateway/Shard.d.ts +4 -2
- package/dist/lib/gateway/Shard.js +94 -74
- package/dist/lib/gateway/ShardManager.d.ts +6 -1
- package/dist/lib/gateway/ShardManager.js +6 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/rest/CDN.d.ts +20 -20
- package/dist/lib/rest/CDN.js +20 -20
- package/dist/lib/rest/Endpoints.d.ts +81 -81
- package/dist/lib/rest/Endpoints.js +91 -91
- package/dist/lib/types/application-command.d.ts +4 -4
- package/dist/lib/types/application.d.ts +2 -2
- package/dist/lib/types/audit-log.d.ts +5 -5
- package/dist/lib/types/auto-moderation.d.ts +3 -3
- package/dist/lib/types/channel.d.ts +23 -21
- package/dist/lib/types/entitlements.d.ts +6 -6
- package/dist/lib/types/gateway-events.d.ts +83 -70
- package/dist/lib/types/guild-scheduled-event.d.ts +5 -5
- package/dist/lib/types/guild-template.d.ts +2 -2
- package/dist/lib/types/guild.d.ts +17 -17
- package/dist/lib/types/interaction.d.ts +8 -8
- package/dist/lib/types/message-components.d.ts +4 -4
- package/dist/lib/types/poll.d.ts +1 -1
- package/dist/lib/types/role.d.ts +3 -3
- package/dist/lib/types/sku.d.ts +2 -2
- package/dist/lib/types/stage-instance.d.ts +3 -3
- package/dist/lib/types/sticker.d.ts +5 -5
- package/dist/lib/types/team.d.ts +2 -2
- package/dist/lib/types/user.d.ts +1 -1
- package/dist/lib/types/voice-connections.d.ts +64 -0
- package/dist/lib/types/voice-connections.js +2 -0
- package/dist/lib/types/voice.d.ts +4 -4
- package/dist/lib/types/webhook.d.ts +3 -3
- package/dist/lib/utils/Util.d.ts +2 -2
- package/dist/lib/utils/Util.js +195 -193
- package/dist/lib/voice/VoiceConnection.d.ts +57 -0
- package/dist/lib/voice/VoiceConnection.js +150 -0
- package/dist/lib/voice/VoiceConnectionManager.d.ts +19 -0
- package/dist/lib/voice/VoiceConnectionManager.js +66 -0
- package/dist/lib/voice/index.d.ts +2 -0
- package/dist/lib/voice/index.js +18 -0
- package/dist/package.json +3 -3
- 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
|
-
|
189
|
+
ownerID: snowflake;
|
190
190
|
permissions?: string;
|
191
191
|
region?: string | null;
|
192
|
-
|
192
|
+
afkChannelID: snowflake | null;
|
193
193
|
afkTimeout: number;
|
194
194
|
widgetEnabled?: boolean;
|
195
|
-
|
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
|
-
|
204
|
-
|
203
|
+
applicationID: snowflake | null;
|
204
|
+
systemChannelID: snowflake | null;
|
205
205
|
systemChannelFlags: SystemChannelFlags;
|
206
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
307
|
+
channelID: snowflake;
|
308
308
|
description: string;
|
309
|
-
|
309
|
+
emojiID: snowflake | null;
|
310
310
|
emojiName: string | null;
|
311
311
|
}
|
312
312
|
export interface GuildOnboarding {
|
313
|
-
|
313
|
+
guildID: snowflake;
|
314
314
|
prompts: Array<OnboardingPrompt>;
|
315
|
-
|
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
|
-
|
331
|
-
|
330
|
+
channelIDs: Array<snowflake>;
|
331
|
+
roleIDs: Array<snowflake>;
|
332
332
|
emoji?: Emoji;
|
333
|
-
|
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
|
-
|
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
|
-
|
114
|
+
guildID?: snowflake;
|
115
115
|
channel?: Channel;
|
116
|
-
|
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
|
-
|
136
|
-
|
135
|
+
guildID?: snowflake;
|
136
|
+
targetID?: snowflake;
|
137
137
|
}
|
138
138
|
export interface MessageComponentData {
|
139
|
-
|
139
|
+
customID: string;
|
140
140
|
componentType: ComponentTypes;
|
141
141
|
values?: Array<string>;
|
142
142
|
resolved?: ResolvedData;
|
143
143
|
}
|
144
144
|
export interface ModalSubmitData {
|
145
|
-
|
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
|
-
|
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
|
-
|
63
|
-
|
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
|
-
|
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
|
-
|
91
|
+
customID: string;
|
92
92
|
style: TextInputStyles;
|
93
93
|
label: string;
|
94
94
|
minLength?: number;
|
package/dist/lib/types/poll.d.ts
CHANGED
package/dist/lib/types/role.d.ts
CHANGED
@@ -39,10 +39,10 @@ export interface Role {
|
|
39
39
|
flags: RoleFlags;
|
40
40
|
}
|
41
41
|
export interface RoleTags {
|
42
|
-
|
43
|
-
|
42
|
+
botID?: snowflake;
|
43
|
+
integrationID?: snowflake;
|
44
44
|
premiumSubscriber?: null;
|
45
|
-
|
45
|
+
subscriptionListingID?: snowflake;
|
46
46
|
availableForPurchase?: null;
|
47
47
|
guildConnections?: null;
|
48
48
|
}
|
package/dist/lib/types/sku.d.ts
CHANGED
@@ -18,8 +18,8 @@ export interface RawSKU {
|
|
18
18
|
export interface SKU {
|
19
19
|
id: snowflake;
|
20
20
|
type: SKUTypes;
|
21
|
-
|
22
|
-
|
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
|
-
|
16
|
-
|
15
|
+
guildID: snowflake;
|
16
|
+
channelID: snowflake;
|
17
17
|
topic: string;
|
18
18
|
privacyLevel: PrivacyLevel;
|
19
19
|
discoverableDisabled: boolean;
|
20
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
59
|
-
|
58
|
+
skuID: snowflake;
|
59
|
+
coverStickerID?: snowflake;
|
60
60
|
description: string;
|
61
|
-
|
61
|
+
bannerAssetID?: snowflake;
|
62
62
|
}
|
package/dist/lib/types/team.d.ts
CHANGED
@@ -21,11 +21,11 @@ export interface Team {
|
|
21
21
|
id: snowflake;
|
22
22
|
members: Array<TeamMember>;
|
23
23
|
name: string;
|
24
|
-
|
24
|
+
ownerUserID: snowflake;
|
25
25
|
}
|
26
26
|
export interface TeamMember {
|
27
27
|
membershipState: number;
|
28
|
-
|
28
|
+
teamID: snowflake;
|
29
29
|
user: User;
|
30
30
|
role: TeamMemberRoleTypes;
|
31
31
|
}
|
package/dist/lib/types/user.d.ts
CHANGED
@@ -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
|
+
}
|
@@ -25,11 +25,11 @@ export interface RawVoiceRegion {
|
|
25
25
|
custom: boolean;
|
26
26
|
}
|
27
27
|
export interface VoiceState {
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
guildID?: snowflake;
|
29
|
+
channelID: snowflake | null;
|
30
|
+
userID: snowflake;
|
31
31
|
member?: GuildMember;
|
32
|
-
|
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
|
-
|
25
|
-
|
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
|
-
|
30
|
+
applicationID: snowflake | null;
|
31
31
|
sourceGuild?: Guild;
|
32
32
|
sourceChannel?: Channel;
|
33
33
|
url?: string;
|
package/dist/lib/utils/Util.d.ts
CHANGED
@@ -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" | "
|
87
|
-
testEntitlementToRaw(entitlement: Omit<Entitlement, "startsAt" | "endsAt" | "
|
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;
|