disgroove 2.2.7-dev.fca4921 → 3.0.0-dev.51640ff
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/dist/lib/Client.d.ts +291 -254
- package/dist/lib/Client.js +554 -460
- package/dist/lib/constants.d.ts +29 -21
- package/dist/lib/constants.js +33 -24
- package/dist/lib/gateway/Shard.d.ts +5 -3
- package/dist/lib/gateway/Shard.js +183 -120
- package/dist/lib/index.d.ts +5 -1
- package/dist/lib/index.js +5 -1
- package/dist/lib/rest/Endpoints.d.ts +95 -91
- package/dist/lib/rest/Endpoints.js +111 -102
- package/dist/lib/rest/RequestManager.d.ts +1 -3
- package/dist/lib/transformers/ApplicationCommands.js +4 -4
- package/dist/lib/transformers/Applications.d.ts +2 -0
- package/dist/lib/transformers/Applications.js +110 -4
- package/dist/lib/transformers/AuditLogs.js +10 -10
- package/dist/lib/transformers/AutoModeration.js +6 -6
- package/dist/lib/transformers/Channels.js +16 -16
- package/dist/lib/transformers/Components.d.ts +13 -3
- package/dist/lib/transformers/Components.js +283 -156
- package/dist/lib/transformers/Entitlements.d.ts +2 -2
- package/dist/lib/transformers/Entitlements.js +16 -16
- package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
- package/dist/lib/transformers/GuildTemplates.js +4 -4
- package/dist/lib/transformers/Guilds.js +28 -28
- package/dist/lib/transformers/Interactions.js +300 -55
- package/dist/lib/transformers/Lobbies.d.ts +7 -0
- package/dist/lib/transformers/Lobbies.js +38 -0
- package/dist/lib/transformers/Messages.d.ts +4 -3
- package/dist/lib/transformers/Messages.js +38 -52
- package/dist/lib/transformers/Polls.js +2 -2
- package/dist/lib/transformers/Presences.js +6 -6
- package/dist/lib/transformers/Roles.js +8 -8
- package/dist/lib/transformers/SKUs.js +2 -2
- package/dist/lib/transformers/Soundboards.js +6 -6
- package/dist/lib/transformers/StageInstances.js +6 -6
- package/dist/lib/transformers/Stickers.js +3 -3
- package/dist/lib/transformers/Subscriptions.js +8 -8
- package/dist/lib/transformers/Teams.js +4 -4
- package/dist/lib/transformers/Users.js +6 -6
- package/dist/lib/transformers/Voice.js +8 -8
- package/dist/lib/transformers/Webhooks.js +6 -6
- package/dist/lib/transformers/index.d.ts +2 -1
- package/dist/lib/transformers/index.js +2 -1
- package/dist/lib/types/application-command.d.ts +9 -4
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
- package/dist/lib/types/application.d.ts +12 -7
- package/dist/lib/types/audit-log.d.ts +9 -5
- package/dist/lib/types/auto-moderation.d.ts +7 -3
- package/dist/lib/types/channel.d.ts +17 -23
- package/dist/lib/types/common.d.ts +2 -0
- package/dist/lib/types/components.d.ts +478 -0
- package/dist/lib/types/components.js +2 -0
- package/dist/lib/types/emoji.d.ts +1 -0
- package/dist/lib/types/entitlements.d.ts +5 -4
- package/dist/lib/types/gateway-events.d.ts +203 -130
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
- package/dist/lib/types/guild-template.d.ts +3 -2
- package/dist/lib/types/guild.d.ts +40 -22
- package/dist/lib/types/interaction.d.ts +35 -18
- package/dist/lib/types/invite.d.ts +5 -2
- package/dist/lib/types/lobby.d.ts +31 -0
- package/dist/lib/types/lobby.js +2 -0
- package/dist/lib/types/message-components.d.ts +334 -118
- package/dist/lib/types/message.d.ts +32 -20
- package/dist/lib/types/poll.d.ts +7 -1
- package/dist/lib/types/role.d.ts +8 -5
- package/dist/lib/types/sku.d.ts +2 -1
- package/dist/lib/types/soundboard.d.ts +4 -3
- package/dist/lib/types/stage-instance.d.ts +4 -3
- package/dist/lib/types/sticker.d.ts +8 -5
- package/dist/lib/types/subscription.d.ts +6 -5
- package/dist/lib/types/team.d.ts +4 -2
- package/dist/lib/types/user.d.ts +10 -3
- package/dist/lib/types/voice.d.ts +6 -4
- package/dist/lib/types/webhook.d.ts +4 -3
- package/dist/lib/utils/CDN.d.ts +22 -22
- package/dist/lib/utils/CDN.js +22 -22
- package/dist/lib/utils/formatters.d.ts +7 -7
- package/dist/lib/utils/formatters.js +19 -19
- package/dist/package.json +4 -4
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes } from "../constants";
|
|
2
2
|
import type { Application, RawApplication } from "./application";
|
|
3
|
-
import type { Channel, RawChannel
|
|
3
|
+
import type { Channel, RawChannel } from "./channel";
|
|
4
4
|
import type { snowflake, timestamp } from "./common";
|
|
5
5
|
import type { Emoji, RawEmoji } from "./emoji";
|
|
6
6
|
import type { MessageInteraction, RawMessageInteraction, RawResolvedData, ResolvedData } from "./interaction";
|
|
7
|
-
import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "./
|
|
7
|
+
import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "./components";
|
|
8
8
|
import type { Poll, RawPoll } from "./poll";
|
|
9
9
|
import type { RawStickerItem, RawSticker, Sticker, StickerItem } from "./sticker";
|
|
10
10
|
import type { RawUser, User } from "./user";
|
|
@@ -29,7 +29,7 @@ export interface RawMessage {
|
|
|
29
29
|
webhook_id?: snowflake;
|
|
30
30
|
type: MessageTypes;
|
|
31
31
|
activity?: RawMessageActivity;
|
|
32
|
-
application?: RawApplication
|
|
32
|
+
application?: Partial<RawApplication>;
|
|
33
33
|
application_id?: snowflake;
|
|
34
34
|
flags?: MessageFlags;
|
|
35
35
|
message_reference?: RawMessageReference;
|
|
@@ -38,7 +38,7 @@ export interface RawMessage {
|
|
|
38
38
|
interaction_metadata?: RawMessageInteractionMetadata;
|
|
39
39
|
interaction?: RawMessageInteraction;
|
|
40
40
|
thread?: RawChannel;
|
|
41
|
-
components?: Array<
|
|
41
|
+
components?: Array<RawActionRow | RawSection | RawTextDisplay | RawMediaGallery | RawFile | RawSeparator | RawContainer>;
|
|
42
42
|
sticker_items?: Array<RawStickerItem>;
|
|
43
43
|
stickers?: Array<RawSticker>;
|
|
44
44
|
position?: number;
|
|
@@ -47,7 +47,6 @@ export interface RawMessage {
|
|
|
47
47
|
poll?: RawPoll;
|
|
48
48
|
call?: RawMessageCall;
|
|
49
49
|
}
|
|
50
|
-
export type RawMessageTopLevelComponent = RawActionRow | RawTextDisplay | RawContainer | RawFile | RawSection | RawSeparator | RawMediaGallery;
|
|
51
50
|
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
|
|
52
51
|
export interface RawMessageActivity {
|
|
53
52
|
type: MessageActivityTypes;
|
|
@@ -197,6 +196,13 @@ export interface RawAllowedMentions {
|
|
|
197
196
|
users?: Array<snowflake>;
|
|
198
197
|
replied_user?: boolean;
|
|
199
198
|
}
|
|
199
|
+
/** https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure */
|
|
200
|
+
export interface RawRoleSubscriptionData {
|
|
201
|
+
role_subscription_listing_id: snowflake;
|
|
202
|
+
tier_name: string;
|
|
203
|
+
total_months_subscribed: number;
|
|
204
|
+
is_renewal: boolean;
|
|
205
|
+
}
|
|
200
206
|
/** https://discord.com/developers/docs/resources/message#message-pin-object-message-pin-structure */
|
|
201
207
|
export interface RawMessagePin {
|
|
202
208
|
pinnet_at: timestamp;
|
|
@@ -204,7 +210,7 @@ export interface RawMessagePin {
|
|
|
204
210
|
}
|
|
205
211
|
export interface Message {
|
|
206
212
|
id: snowflake;
|
|
207
|
-
|
|
213
|
+
channelId: snowflake;
|
|
208
214
|
author: User;
|
|
209
215
|
content: string;
|
|
210
216
|
timestamp: timestamp;
|
|
@@ -219,11 +225,11 @@ export interface Message {
|
|
|
219
225
|
reactions?: Array<Reaction>;
|
|
220
226
|
nonce?: number | string;
|
|
221
227
|
pinned: boolean;
|
|
222
|
-
|
|
228
|
+
webhookId?: snowflake;
|
|
223
229
|
type: MessageTypes;
|
|
224
230
|
activity?: MessageActivity;
|
|
225
|
-
application?: Application
|
|
226
|
-
|
|
231
|
+
application?: Partial<Application>;
|
|
232
|
+
applicationId?: snowflake;
|
|
227
233
|
flags?: MessageFlags;
|
|
228
234
|
messageReference?: MessageReference;
|
|
229
235
|
messageSnapshots?: Array<MessageSnapshot>;
|
|
@@ -231,7 +237,7 @@ export interface Message {
|
|
|
231
237
|
interactionMetadata?: MessageInteractionMetadata;
|
|
232
238
|
interaction?: MessageInteraction;
|
|
233
239
|
thread?: Channel;
|
|
234
|
-
components?: Array<
|
|
240
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
|
|
235
241
|
stickerItems?: Array<StickerItem>;
|
|
236
242
|
stickers?: Array<Sticker>;
|
|
237
243
|
position?: number;
|
|
@@ -240,18 +246,17 @@ export interface Message {
|
|
|
240
246
|
poll?: Poll;
|
|
241
247
|
call?: MessageCall;
|
|
242
248
|
}
|
|
243
|
-
export type MessageTopLevelComponent = ActionRow | TextDisplay | Container | File | Section | Separator | MediaGallery;
|
|
244
249
|
export interface MessageActivity {
|
|
245
250
|
type: MessageActivityTypes;
|
|
246
|
-
|
|
251
|
+
partyId?: string;
|
|
247
252
|
}
|
|
248
253
|
export interface MessageInteractionMetadata {
|
|
249
254
|
id: snowflake;
|
|
250
255
|
type: InteractionType;
|
|
251
256
|
user: User;
|
|
252
257
|
authorizingIntegrationOwners: Record<ApplicationIntegrationTypes, string>;
|
|
253
|
-
|
|
254
|
-
|
|
258
|
+
originalResponseMessageId?: snowflake;
|
|
259
|
+
interactedMessageId?: snowflake;
|
|
255
260
|
triggeringInteractionMetadata?: MessageInteractionMetadata;
|
|
256
261
|
}
|
|
257
262
|
export interface MessageCall {
|
|
@@ -260,9 +265,9 @@ export interface MessageCall {
|
|
|
260
265
|
}
|
|
261
266
|
export interface MessageReference {
|
|
262
267
|
type?: MessageReferenceTypes;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
268
|
+
messageId?: snowflake;
|
|
269
|
+
channelId?: snowflake;
|
|
270
|
+
guildId?: snowflake;
|
|
266
271
|
failIfNotExists?: boolean;
|
|
267
272
|
}
|
|
268
273
|
export interface MessageSnapshot {
|
|
@@ -337,9 +342,9 @@ export interface PollResultEmbedFields {
|
|
|
337
342
|
pollQuestionText: string;
|
|
338
343
|
victorAnswerVotes: Array<number>;
|
|
339
344
|
totalVotes: number;
|
|
340
|
-
|
|
345
|
+
victorAnswerId?: snowflake;
|
|
341
346
|
victorAnswerText?: string;
|
|
342
|
-
|
|
347
|
+
victorAnswerEmojiId?: snowflake;
|
|
343
348
|
victorAnswerEmojiName?: string;
|
|
344
349
|
victorAnswerEmojiAnimated?: boolean;
|
|
345
350
|
}
|
|
@@ -361,7 +366,7 @@ export interface Attachment {
|
|
|
361
366
|
}
|
|
362
367
|
export interface ChannelMention {
|
|
363
368
|
id: snowflake;
|
|
364
|
-
|
|
369
|
+
guildId: snowflake;
|
|
365
370
|
type: ChannelTypes;
|
|
366
371
|
name: string;
|
|
367
372
|
}
|
|
@@ -371,6 +376,13 @@ export interface AllowedMentions {
|
|
|
371
376
|
users?: Array<snowflake>;
|
|
372
377
|
repliedUser?: boolean;
|
|
373
378
|
}
|
|
379
|
+
/** https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure */
|
|
380
|
+
export interface RoleSubscriptionData {
|
|
381
|
+
roleSubscriptionListingId: snowflake;
|
|
382
|
+
tierName: string;
|
|
383
|
+
totalMonthsSubscribed: number;
|
|
384
|
+
isRenewal: boolean;
|
|
385
|
+
}
|
|
374
386
|
export interface MessagePin {
|
|
375
387
|
pinnetAt: timestamp;
|
|
376
388
|
message: Message;
|
package/dist/lib/types/poll.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface RawPollAnswerCount {
|
|
|
38
38
|
count: number;
|
|
39
39
|
me_voted: boolean;
|
|
40
40
|
}
|
|
41
|
+
/** https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure */
|
|
41
42
|
export interface Poll {
|
|
42
43
|
question: PollMedia;
|
|
43
44
|
answers: Array<PollAnswer>;
|
|
@@ -46,6 +47,7 @@ export interface Poll {
|
|
|
46
47
|
layoutType: LayoutType;
|
|
47
48
|
results?: PollResults;
|
|
48
49
|
}
|
|
50
|
+
/** https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure */
|
|
49
51
|
export interface PollCreateParams {
|
|
50
52
|
question: PollMedia;
|
|
51
53
|
answers: Array<PollAnswer>;
|
|
@@ -53,18 +55,22 @@ export interface PollCreateParams {
|
|
|
53
55
|
allowMultiselect?: boolean;
|
|
54
56
|
layoutType?: LayoutType;
|
|
55
57
|
}
|
|
58
|
+
/** https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure */
|
|
56
59
|
export interface PollMedia {
|
|
57
60
|
text?: string;
|
|
58
61
|
emoji?: Pick<Emoji, "id" | "name">;
|
|
59
62
|
}
|
|
63
|
+
/** https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure */
|
|
60
64
|
export interface PollAnswer {
|
|
61
|
-
|
|
65
|
+
answerId: number;
|
|
62
66
|
pollMedia: PollMedia;
|
|
63
67
|
}
|
|
68
|
+
/** https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure */
|
|
64
69
|
export interface PollResults {
|
|
65
70
|
isFinalized: boolean;
|
|
66
71
|
answerCounts: Array<PollAnswerCount>;
|
|
67
72
|
}
|
|
73
|
+
/** https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure */
|
|
68
74
|
export interface PollAnswerCount {
|
|
69
75
|
id: number;
|
|
70
76
|
count: number;
|
package/dist/lib/types/role.d.ts
CHANGED
|
@@ -29,8 +29,9 @@ export interface RawRoleTags {
|
|
|
29
29
|
export interface RawRoleColors {
|
|
30
30
|
primary_color: number;
|
|
31
31
|
secondary_color: number | null;
|
|
32
|
-
|
|
32
|
+
tertiary_color: number | null;
|
|
33
33
|
}
|
|
34
|
+
/** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
|
|
34
35
|
export interface Role {
|
|
35
36
|
id: snowflake;
|
|
36
37
|
name: string;
|
|
@@ -46,16 +47,18 @@ export interface Role {
|
|
|
46
47
|
tags?: RoleTags;
|
|
47
48
|
flags: RoleFlags;
|
|
48
49
|
}
|
|
50
|
+
/** https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure */
|
|
49
51
|
export interface RoleTags {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
botId?: snowflake;
|
|
53
|
+
integrationId?: snowflake;
|
|
52
54
|
premiumSubscriber?: null;
|
|
53
|
-
|
|
55
|
+
subscriptionListingId?: snowflake;
|
|
54
56
|
availableForPurchase?: null;
|
|
55
57
|
guildConnections?: null;
|
|
56
58
|
}
|
|
59
|
+
/** https://discord.com/developers/docs/topics/permissions#role-object-role-colors-object */
|
|
57
60
|
export interface RoleColors {
|
|
58
61
|
primaryColor: number;
|
|
59
62
|
secondaryColor: number | null;
|
|
60
|
-
|
|
63
|
+
tertiaryColor: number | null;
|
|
61
64
|
}
|
package/dist/lib/types/sku.d.ts
CHANGED
|
@@ -9,10 +9,11 @@ export interface RawSKU {
|
|
|
9
9
|
slug: string;
|
|
10
10
|
flags: SKUFlags;
|
|
11
11
|
}
|
|
12
|
+
/** https://discord.com/developers/docs/resources/sku#sku-object-sku-structure */
|
|
12
13
|
export interface SKU {
|
|
13
14
|
id: snowflake;
|
|
14
15
|
type: SKUTypes;
|
|
15
|
-
|
|
16
|
+
applicationId: snowflake;
|
|
16
17
|
name: string;
|
|
17
18
|
slug: string;
|
|
18
19
|
flags: SKUFlags;
|
|
@@ -11,13 +11,14 @@ export interface RawSoundboardSound {
|
|
|
11
11
|
available: boolean;
|
|
12
12
|
user?: RawUser;
|
|
13
13
|
}
|
|
14
|
+
/** https://discord.com/developers/docs/resources/soundboard#soundboard-sound-structure */
|
|
14
15
|
export interface SoundboardSound {
|
|
15
16
|
name: string;
|
|
16
|
-
|
|
17
|
+
soundId: snowflake;
|
|
17
18
|
volume: number;
|
|
18
|
-
|
|
19
|
+
emojiId: snowflake | null;
|
|
19
20
|
emojiName: string | null;
|
|
20
|
-
|
|
21
|
+
guildId?: snowflake;
|
|
21
22
|
available: boolean;
|
|
22
23
|
user?: User;
|
|
23
24
|
}
|
|
@@ -10,12 +10,13 @@ export interface RawStageInstance {
|
|
|
10
10
|
discoverable_disabled: boolean;
|
|
11
11
|
guild_scheduled_event_id: snowflake | null;
|
|
12
12
|
}
|
|
13
|
+
/** https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure */
|
|
13
14
|
export interface StageInstance {
|
|
14
15
|
id: snowflake;
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
guildId: snowflake;
|
|
17
|
+
channelId: snowflake;
|
|
17
18
|
topic: string;
|
|
18
19
|
privacyLevel: PrivacyLevel;
|
|
19
20
|
discoverableDisabled: boolean;
|
|
20
|
-
|
|
21
|
+
guildScheduledEventId: snowflake | null;
|
|
21
22
|
}
|
|
@@ -31,30 +31,33 @@ export interface RawStickerPack {
|
|
|
31
31
|
description: string;
|
|
32
32
|
banner_asset_id?: snowflake;
|
|
33
33
|
}
|
|
34
|
+
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-structure */
|
|
34
35
|
export interface Sticker {
|
|
35
36
|
id: snowflake;
|
|
36
|
-
|
|
37
|
+
packId?: snowflake;
|
|
37
38
|
name: string;
|
|
38
39
|
description: string | null;
|
|
39
40
|
tags: string;
|
|
40
41
|
type: StickerTypes;
|
|
41
42
|
formatType: StickerFormatTypes;
|
|
42
43
|
available?: boolean;
|
|
43
|
-
|
|
44
|
+
guildId?: snowflake;
|
|
44
45
|
user?: User;
|
|
45
46
|
sortValue?: number;
|
|
46
47
|
}
|
|
48
|
+
/** https://discord.com/developers/docs/resources/sticker#sticker-item-object-sticker-item-structure */
|
|
47
49
|
export interface StickerItem {
|
|
48
50
|
id: snowflake;
|
|
49
51
|
name: string;
|
|
50
52
|
formatType: StickerFormatTypes;
|
|
51
53
|
}
|
|
54
|
+
/** https://discord.com/developers/docs/resources/sticker#sticker-pack-object-sticker-pack-structure */
|
|
52
55
|
export interface StickerPack {
|
|
53
56
|
id: snowflake;
|
|
54
57
|
stickers: Array<Sticker>;
|
|
55
58
|
name: string;
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
skuId: snowflake;
|
|
60
|
+
coverStickerId?: snowflake;
|
|
58
61
|
description: string;
|
|
59
|
-
|
|
62
|
+
bannerAssetId?: snowflake;
|
|
60
63
|
}
|
|
@@ -6,19 +6,20 @@ export interface RawSubscription {
|
|
|
6
6
|
user_id: snowflake;
|
|
7
7
|
sku_ids: Array<snowflake>;
|
|
8
8
|
entitlement_ids: Array<snowflake>;
|
|
9
|
-
renewal_sku_ids: Array<snowflake
|
|
9
|
+
renewal_sku_ids: Array<snowflake> | null;
|
|
10
10
|
current_period_start: timestamp;
|
|
11
11
|
current_period_end: timestamp;
|
|
12
12
|
status: SubscriptionStatuses;
|
|
13
13
|
canceled_at: timestamp | null;
|
|
14
14
|
country?: string;
|
|
15
15
|
}
|
|
16
|
+
/** https://discord.com/developers/docs/resources/subscription#subscription-object */
|
|
16
17
|
export interface Subscription {
|
|
17
18
|
id: snowflake;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
userId: snowflake;
|
|
20
|
+
skuIds: Array<snowflake>;
|
|
21
|
+
entitlementIds: Array<snowflake>;
|
|
22
|
+
renewalSKUIds: Array<snowflake> | null;
|
|
22
23
|
currentPeriodStart: timestamp;
|
|
23
24
|
currentPeriodEnd: timestamp;
|
|
24
25
|
status: SubscriptionStatuses;
|
package/dist/lib/types/team.d.ts
CHANGED
|
@@ -16,16 +16,18 @@ export interface RawTeamMember {
|
|
|
16
16
|
user: RawUser;
|
|
17
17
|
role: TeamMemberRoleTypes;
|
|
18
18
|
}
|
|
19
|
+
/** https://discord.com/developers/docs/topics/teams#data-models-team-object */
|
|
19
20
|
export interface Team {
|
|
20
21
|
icon: string | null;
|
|
21
22
|
id: snowflake;
|
|
22
23
|
members: Array<TeamMember>;
|
|
23
24
|
name: string;
|
|
24
|
-
|
|
25
|
+
ownerUserId: snowflake;
|
|
25
26
|
}
|
|
27
|
+
/** https://discord.com/developers/docs/topics/teams#data-models-team-member-object */
|
|
26
28
|
export interface TeamMember {
|
|
27
29
|
membershipState: number;
|
|
28
|
-
|
|
30
|
+
teamId: snowflake;
|
|
29
31
|
user: User;
|
|
30
32
|
role: TeamMemberRoleTypes;
|
|
31
33
|
}
|
package/dist/lib/types/user.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export interface RawApplicationRoleConnection {
|
|
|
66
66
|
platform_username: string | null;
|
|
67
67
|
metadata: RawApplicationRoleConnectionMetadata;
|
|
68
68
|
}
|
|
69
|
+
/** https://discord.com/developers/docs/resources/user#user-object-user-structure */
|
|
69
70
|
export interface User {
|
|
70
71
|
id: snowflake;
|
|
71
72
|
username: string;
|
|
@@ -87,25 +88,30 @@ export interface User {
|
|
|
87
88
|
collectibles?: Collectibles | null;
|
|
88
89
|
primaryGuild?: UserPrimaryGuild | null;
|
|
89
90
|
}
|
|
91
|
+
/** https://discord.com/developers/docs/resources/user#user-object-user-primary-guild */
|
|
90
92
|
export interface UserPrimaryGuild {
|
|
91
|
-
|
|
93
|
+
identityGuildId: snowflake | null;
|
|
92
94
|
identityEnabled: boolean | null;
|
|
93
95
|
tag: string | null;
|
|
94
96
|
badge: string | null;
|
|
95
97
|
}
|
|
98
|
+
/** https://discord.com/developers/docs/resources/user#avatar-decoration-data-object-avatar-decoration-data-structure */
|
|
96
99
|
export interface AvatarDecorationData {
|
|
97
100
|
asset: string;
|
|
98
|
-
|
|
101
|
+
skuId: snowflake;
|
|
99
102
|
}
|
|
103
|
+
/** https://discord.com/developers/docs/resources/user#collectibles-object-collectibles-structure */
|
|
100
104
|
export interface Collectibles {
|
|
101
105
|
nameplate?: Nameplate;
|
|
102
106
|
}
|
|
107
|
+
/** https://discord.com/developers/docs/resources/user#nameplate-object-nameplate-structure */
|
|
103
108
|
export interface Nameplate {
|
|
104
|
-
|
|
109
|
+
skuId: snowflake;
|
|
105
110
|
asset: string;
|
|
106
111
|
label: string;
|
|
107
112
|
palette: string;
|
|
108
113
|
}
|
|
114
|
+
/** https://discord.com/developers/docs/resources/user#connection-object-connection-structure */
|
|
109
115
|
export interface Connection {
|
|
110
116
|
id: snowflake;
|
|
111
117
|
name: string;
|
|
@@ -118,6 +124,7 @@ export interface Connection {
|
|
|
118
124
|
twoWayLink: boolean;
|
|
119
125
|
visibility: VisibilityTypes;
|
|
120
126
|
}
|
|
127
|
+
/** https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure */
|
|
121
128
|
export interface ApplicationRoleConnection {
|
|
122
129
|
platformName: string | null;
|
|
123
130
|
platformUsername: string | null;
|
|
@@ -24,12 +24,13 @@ export interface RawVoiceRegion {
|
|
|
24
24
|
deprecated: boolean;
|
|
25
25
|
custom: boolean;
|
|
26
26
|
}
|
|
27
|
+
/** https://discord.com/developers/docs/resources/voice#voice-state-object-voice-state-structure */
|
|
27
28
|
export interface VoiceState {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
guildId?: snowflake;
|
|
30
|
+
channelId: snowflake | null;
|
|
31
|
+
userId: snowflake;
|
|
31
32
|
member?: GuildMember;
|
|
32
|
-
|
|
33
|
+
sessionId: string;
|
|
33
34
|
deaf: boolean;
|
|
34
35
|
mute: boolean;
|
|
35
36
|
selfDeaf: boolean;
|
|
@@ -39,6 +40,7 @@ export interface VoiceState {
|
|
|
39
40
|
suppress: boolean;
|
|
40
41
|
requestToSpeakTimestamp: timestamp | null;
|
|
41
42
|
}
|
|
43
|
+
/** https://discord.com/developers/docs/resources/voice#voice-region-object-voice-region-structure */
|
|
42
44
|
export interface VoiceRegion {
|
|
43
45
|
id: snowflake;
|
|
44
46
|
name: string;
|
|
@@ -18,16 +18,17 @@ export interface RawWebhook {
|
|
|
18
18
|
source_channel?: RawChannel;
|
|
19
19
|
url?: string;
|
|
20
20
|
}
|
|
21
|
+
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure */
|
|
21
22
|
export interface Webhook {
|
|
22
23
|
id: snowflake;
|
|
23
24
|
type: WebhookTypes;
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
guildId?: snowflake | null;
|
|
26
|
+
channelId: snowflake | null;
|
|
26
27
|
user?: User;
|
|
27
28
|
name: string | null;
|
|
28
29
|
avatar: string | null;
|
|
29
30
|
token?: string;
|
|
30
|
-
|
|
31
|
+
applicationId: snowflake | null;
|
|
31
32
|
sourceGuild?: Guild;
|
|
32
33
|
sourceChannel?: Channel;
|
|
33
34
|
url?: string;
|
package/dist/lib/utils/CDN.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { ImageFormats } from "../constants";
|
|
2
2
|
import type { snowflake } from "../types/common";
|
|
3
3
|
export declare const cdnURL: (cdnEndpoint: string, imageFormat?: ImageFormats) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
4
|
-
export declare const achievementIcon: (
|
|
5
|
-
export declare const applicationAsset: (
|
|
6
|
-
export declare const applicationCover: (
|
|
7
|
-
export declare const applicationIcon: (
|
|
8
|
-
export declare const customEmoji: (
|
|
4
|
+
export declare const achievementIcon: (applicationId: snowflake, achievementId: snowflake, iconHash: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
5
|
+
export declare const applicationAsset: (applicationId: snowflake, assetId: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
6
|
+
export declare const applicationCover: (applicationId: snowflake, coverImage: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
7
|
+
export declare const applicationIcon: (applicationId: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
8
|
+
export declare const customEmoji: (emojiId: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
9
9
|
export declare const defaultUserAvatar: (index: string) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
10
|
-
export declare const guildBanner: (
|
|
11
|
-
export declare const guildDiscoverySplash: (
|
|
12
|
-
export declare const guildIcon: (
|
|
13
|
-
export declare const guildMemberAvatar: (
|
|
14
|
-
export declare const guildMemberBanner: (
|
|
15
|
-
export declare const guildScheduledEventCover: (
|
|
16
|
-
export declare const guildSplash: (
|
|
17
|
-
export declare const guildTagBadge: (
|
|
18
|
-
export declare const roleIcon: (
|
|
19
|
-
export declare const stickerPackBanner: (
|
|
20
|
-
export declare const sticker: (
|
|
21
|
-
export declare const storePageAsset: (
|
|
22
|
-
export declare const soundboardSound: (
|
|
23
|
-
export declare const teamIcon: (
|
|
24
|
-
export declare const userAvatar: (
|
|
25
|
-
export declare const userAvatarDecoration: (
|
|
26
|
-
export declare const userBanner: (
|
|
10
|
+
export declare const guildBanner: (guildId: snowflake, banner: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
11
|
+
export declare const guildDiscoverySplash: (guildId: snowflake, splash: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
12
|
+
export declare const guildIcon: (guildId: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
13
|
+
export declare const guildMemberAvatar: (guildId: snowflake, userId: snowflake, avatar: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
14
|
+
export declare const guildMemberBanner: (guildId: snowflake, userId: snowflake, banner: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
15
|
+
export declare const guildScheduledEventCover: (scheduledEventId: snowflake, coverImage: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
16
|
+
export declare const guildSplash: (guildId: snowflake, splash: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
17
|
+
export declare const guildTagBadge: (guildId: snowflake, hash: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
18
|
+
export declare const roleIcon: (roleId: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
19
|
+
export declare const stickerPackBanner: (assetId: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
20
|
+
export declare const sticker: (stickerId: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.Lottie | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
21
|
+
export declare const storePageAsset: (applicationId: snowflake, assetId: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
22
|
+
export declare const soundboardSound: (soundId: snowflake) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
23
|
+
export declare const teamIcon: (teamId: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
24
|
+
export declare const userAvatar: (userId: snowflake, avatar: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
25
|
+
export declare const userAvatarDecoration: (userId: snowflake, avatarDecoration: string) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
26
|
+
export declare const userBanner: (userId: snowflake, banner: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.avif` | `https://cdn.discordapp.com/${string}.json`;
|