disgroove 2.2.0-dev.15819eb → 2.2.0-dev.4623b99
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 +500 -73
- package/dist/lib/Client.js +861 -716
- package/dist/lib/gateway/Shard.js +252 -62
- package/dist/lib/index.d.ts +25 -0
- package/dist/lib/index.js +25 -0
- package/dist/lib/types/application-command.d.ts +0 -73
- package/dist/lib/types/application.d.ts +0 -12
- package/dist/lib/types/auto-moderation.d.ts +0 -20
- package/dist/lib/types/channel.d.ts +2 -105
- package/dist/lib/types/emoji.d.ts +0 -9
- package/dist/lib/types/entitlements.d.ts +0 -5
- package/dist/lib/types/guild-scheduled-event.d.ts +0 -23
- package/dist/lib/types/guild-template.d.ts +0 -12
- package/dist/lib/types/guild.d.ts +2 -160
- package/dist/lib/types/interaction.d.ts +12 -5
- package/dist/lib/types/stage-instance.d.ts +0 -11
- package/dist/lib/types/sticker.d.ts +0 -12
- package/dist/lib/types/user.d.ts +2 -26
- package/dist/lib/types/webhook.d.ts +2 -38
- package/dist/lib/utils/Util.d.ts +92 -2
- package/dist/lib/utils/Util.js +2207 -29
- package/dist/package.json +1 -1
- package/package.json +1 -1
@@ -1,12 +1,11 @@
|
|
1
|
-
import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType,
|
2
|
-
import type { File } from "../rest";
|
1
|
+
import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType, MessageActivityTypes, MessageFlags, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
|
3
2
|
import type { RawApplication, Application } from "./application";
|
4
3
|
import type { snowflake, timestamp } from "./common";
|
5
4
|
import type { RawEmoji, Emoji } from "./emoji";
|
6
5
|
import type { RawGuildMember, GuildMember } from "./guild";
|
7
6
|
import type { RawMessageInteraction, RawResolvedData, MessageInteraction, ResolvedData } from "./interaction";
|
8
7
|
import type { RawActionRow, ActionRow } from "./message-components";
|
9
|
-
import type { RawPoll, Poll
|
8
|
+
import type { RawPoll, Poll } from "./poll";
|
10
9
|
import type { RawStickerItem, RawSticker, StickerItem, Sticker } from "./sticker";
|
11
10
|
import type { RawUser, User } from "./user";
|
12
11
|
/** https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */
|
@@ -497,105 +496,3 @@ export interface RoleSubscriptionData {
|
|
497
496
|
totalMonthsSubscribed: number;
|
498
497
|
isRenewal: boolean;
|
499
498
|
}
|
500
|
-
export interface EditChannelParams {
|
501
|
-
name?: string;
|
502
|
-
icon?: string;
|
503
|
-
type?: ChannelTypes;
|
504
|
-
position?: number | null;
|
505
|
-
topic?: string | null;
|
506
|
-
nsfw?: boolean | null;
|
507
|
-
rateLimitPerUser?: number | null;
|
508
|
-
bitrate?: number | null;
|
509
|
-
userLimit?: number | null;
|
510
|
-
permissionOverwrites?: Array<Overwrite> | null;
|
511
|
-
parentId?: snowflake | null;
|
512
|
-
rtcRegion?: string | null;
|
513
|
-
videoQualityMode?: VideoQualityModes | null;
|
514
|
-
defaultAutoArchiveDuration?: number | null;
|
515
|
-
flags?: ChannelFlags;
|
516
|
-
availableTags?: Array<ForumTag>;
|
517
|
-
defaultReactionEmoji?: DefaultReaction | null;
|
518
|
-
defaultThreadRateLimitPerUser?: number;
|
519
|
-
defaultSortOrder?: SortOrderTypes | null;
|
520
|
-
defaultForumLayout?: ForumLayoutTypes;
|
521
|
-
archived?: boolean;
|
522
|
-
autoArchiveDuration?: number;
|
523
|
-
locked?: boolean;
|
524
|
-
invitable?: boolean;
|
525
|
-
appliedTags?: Array<string>;
|
526
|
-
}
|
527
|
-
export interface CreateMessageParams {
|
528
|
-
content?: string;
|
529
|
-
nonce?: string | number;
|
530
|
-
tts?: boolean;
|
531
|
-
embeds?: Array<Embed>;
|
532
|
-
allowedMentions?: AllowedMentions;
|
533
|
-
messageReference?: MessageReference;
|
534
|
-
components?: Array<ActionRow>;
|
535
|
-
stickersIds?: Array<snowflake>;
|
536
|
-
files?: Array<File>;
|
537
|
-
attachments?: Array<Attachment>;
|
538
|
-
flags?: MessageFlags;
|
539
|
-
enforceNonce?: boolean;
|
540
|
-
poll?: PollCreateParams;
|
541
|
-
}
|
542
|
-
export interface EditMessageParams {
|
543
|
-
content?: string | null;
|
544
|
-
embeds?: Array<Embed> | null;
|
545
|
-
flags?: MessageFlags | null;
|
546
|
-
allowedMentions?: AllowedMentions | null;
|
547
|
-
components?: Array<ActionRow> | null;
|
548
|
-
files?: Array<File> | null;
|
549
|
-
attachments?: Array<Attachment> | null;
|
550
|
-
}
|
551
|
-
export interface BulkDeleteMessagesParams {
|
552
|
-
messages: Array<snowflake>;
|
553
|
-
}
|
554
|
-
export interface EditChannelPermissionsParams {
|
555
|
-
allow?: string | null;
|
556
|
-
deny?: string | null;
|
557
|
-
type: number;
|
558
|
-
}
|
559
|
-
export interface CreateChannelInviteParams {
|
560
|
-
maxAge?: number;
|
561
|
-
maxUses?: number;
|
562
|
-
temporary?: boolean;
|
563
|
-
unique?: boolean;
|
564
|
-
targetType?: InviteTargetTypes;
|
565
|
-
targetUserId?: snowflake;
|
566
|
-
targetApplicationId?: snowflake;
|
567
|
-
}
|
568
|
-
export interface FollowAnnouncementChannelParams {
|
569
|
-
webhookChannelId: snowflake;
|
570
|
-
}
|
571
|
-
export interface AddChannelRecipientParams {
|
572
|
-
accessToken: string;
|
573
|
-
nick: string;
|
574
|
-
}
|
575
|
-
export interface CreateThreadFromMessageParams {
|
576
|
-
name: string;
|
577
|
-
autoArchiveDuration?: number;
|
578
|
-
rateLimitPerUser?: number | null;
|
579
|
-
}
|
580
|
-
export interface CreateThreadWithoutMessageParams {
|
581
|
-
name: string;
|
582
|
-
autoArchiveDuration?: number;
|
583
|
-
type?: ChannelTypes;
|
584
|
-
invitable?: boolean;
|
585
|
-
rateLimitPerUser?: number | null;
|
586
|
-
}
|
587
|
-
export interface CreateThreadParams {
|
588
|
-
name: string;
|
589
|
-
autoArchiveDuration?: number;
|
590
|
-
rateLimitPerUser?: number | null;
|
591
|
-
message: {
|
592
|
-
content?: string | null;
|
593
|
-
embeds?: Array<Embed> | null;
|
594
|
-
allowedMentions?: AllowedMentions | null;
|
595
|
-
components?: Array<ActionRow> | null;
|
596
|
-
attachments?: Array<Attachment> | null;
|
597
|
-
flags?: MessageFlags | null;
|
598
|
-
};
|
599
|
-
appliedTags?: Array<string>;
|
600
|
-
files?: Array<File> | null;
|
601
|
-
}
|
@@ -21,12 +21,3 @@ export interface Emoji {
|
|
21
21
|
animated?: boolean;
|
22
22
|
available?: boolean;
|
23
23
|
}
|
24
|
-
export interface CreateGuildEmojiParams {
|
25
|
-
name: string;
|
26
|
-
image: string;
|
27
|
-
roles: Array<string>;
|
28
|
-
}
|
29
|
-
export interface EditGuildEmojiParams {
|
30
|
-
name?: string;
|
31
|
-
roles?: Array<string> | null;
|
32
|
-
}
|
@@ -57,26 +57,3 @@ export interface GuildScheduledEventUser {
|
|
57
57
|
user: User;
|
58
58
|
member?: GuildMember;
|
59
59
|
}
|
60
|
-
export interface CreateGuildScheduledEventParams {
|
61
|
-
channelId?: snowflake | null;
|
62
|
-
entityMetadata?: GuildScheduledEventEntityMetadata | null;
|
63
|
-
name: string;
|
64
|
-
privacyLevel: GuildScheduledEventPrivacyLevel;
|
65
|
-
scheduledStartTime: string;
|
66
|
-
scheduledEndTime?: string | null;
|
67
|
-
description?: string | null;
|
68
|
-
entityType: GuildScheduledEventEntityTypes;
|
69
|
-
image?: string;
|
70
|
-
}
|
71
|
-
export interface EditGuildScheduledEventParams {
|
72
|
-
channelId?: snowflake | null;
|
73
|
-
entityMetadata?: GuildScheduledEventEntityMetadata | null;
|
74
|
-
name?: string;
|
75
|
-
privacyLevel?: GuildScheduledEventPrivacyLevel;
|
76
|
-
scheduledStartTime?: string;
|
77
|
-
scheduledEndTime?: string;
|
78
|
-
description?: string | null;
|
79
|
-
entityType?: GuildScheduledEventEntityTypes;
|
80
|
-
status?: GuildScheduledEventStatus;
|
81
|
-
image?: string;
|
82
|
-
}
|
@@ -28,15 +28,3 @@ export interface GuildTemplate {
|
|
28
28
|
serializedSourceGuild: Guild;
|
29
29
|
isDirty: boolean | null;
|
30
30
|
}
|
31
|
-
export interface CreateGuildFromGuildTemplateParams {
|
32
|
-
name: string;
|
33
|
-
icon?: string;
|
34
|
-
}
|
35
|
-
export interface CreateGuildTemplateParams {
|
36
|
-
name: string;
|
37
|
-
description?: string | null;
|
38
|
-
}
|
39
|
-
export interface EditGuildTemplateParams {
|
40
|
-
name?: string;
|
41
|
-
description?: string | null;
|
42
|
-
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, MFALevel, PremiumTier, GuildNSFWLevel, GuildMemberFlags, IntegrationExpireBehaviors, OAuth2Scopes, SystemChannelFlags, OnboardingMode, PromptTypes
|
2
|
-
import type { RawChannel, Channel
|
1
|
+
import type { VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, MFALevel, PremiumTier, GuildNSFWLevel, GuildMemberFlags, IntegrationExpireBehaviors, OAuth2Scopes, SystemChannelFlags, OnboardingMode, PromptTypes } from "../constants";
|
2
|
+
import type { RawChannel, Channel } from "./channel";
|
3
3
|
import type { snowflake, timestamp } from "./common";
|
4
4
|
import type { RawEmoji, Emoji } from "./emoji";
|
5
5
|
import type { RawRole, Role } from "./role";
|
@@ -336,161 +336,3 @@ export interface PromptOption {
|
|
336
336
|
title: string;
|
337
337
|
description: string | null;
|
338
338
|
}
|
339
|
-
export interface CreateGuildParams {
|
340
|
-
name: string;
|
341
|
-
region?: string | null;
|
342
|
-
icon?: string;
|
343
|
-
verificationLevel?: VerificationLevel;
|
344
|
-
defaultMessageNotifications?: DefaultMessageNotificationLevel;
|
345
|
-
explicitContentFilter?: ExplicitContentFilterLevel;
|
346
|
-
roles?: Array<{
|
347
|
-
name?: string;
|
348
|
-
permissions?: string;
|
349
|
-
color?: number;
|
350
|
-
hoist?: boolean;
|
351
|
-
icon?: string | null;
|
352
|
-
unicodeEmoji?: string | null;
|
353
|
-
mentionable?: boolean;
|
354
|
-
}>;
|
355
|
-
channels?: Array<{
|
356
|
-
name: string;
|
357
|
-
type: ChannelTypes;
|
358
|
-
id?: number;
|
359
|
-
parentId?: number;
|
360
|
-
}>;
|
361
|
-
afkChannelId?: snowflake;
|
362
|
-
afkTimeout?: number;
|
363
|
-
systemChannelId?: snowflake;
|
364
|
-
systemChannelFlags?: SystemChannelFlags;
|
365
|
-
}
|
366
|
-
export interface EditGuildParams {
|
367
|
-
name?: string;
|
368
|
-
region?: string | null;
|
369
|
-
verificationLevel?: VerificationLevel;
|
370
|
-
defaultMessageNotifications?: DefaultMessageNotificationLevel;
|
371
|
-
explicitContentFilter?: ExplicitContentFilterLevel;
|
372
|
-
afkChannelId?: snowflake | null;
|
373
|
-
afkTimeout?: number;
|
374
|
-
icon?: string | null;
|
375
|
-
ownerId?: snowflake;
|
376
|
-
splash?: string | null;
|
377
|
-
discoverySplash?: string | null;
|
378
|
-
banner?: string | null;
|
379
|
-
systemChannelId?: snowflake | null;
|
380
|
-
systemChannelFlags?: SystemChannelFlags;
|
381
|
-
rulesChannelId?: snowflake | null;
|
382
|
-
publicUpdatesChannelId?: snowflake | null;
|
383
|
-
preferredLocale?: string;
|
384
|
-
features?: Array<GuildFeatures>;
|
385
|
-
description?: string | null;
|
386
|
-
premiumProgressBarEnabled?: boolean;
|
387
|
-
safetyAlertsChannelId?: snowflake | null;
|
388
|
-
}
|
389
|
-
export interface CreateGuildChannelParams {
|
390
|
-
name: string | null;
|
391
|
-
type?: ChannelTypes;
|
392
|
-
topic?: string | null;
|
393
|
-
bitrate?: number;
|
394
|
-
userLimit?: number;
|
395
|
-
rateLimitPerUser?: number;
|
396
|
-
position?: number;
|
397
|
-
permissionOverwrites?: Array<Overwrite>;
|
398
|
-
parentId?: snowflake | null;
|
399
|
-
nsfw?: boolean;
|
400
|
-
rtcRegion?: string | null;
|
401
|
-
videoQualityMode?: VideoQualityModes;
|
402
|
-
defaultAutoArchiveDuration?: number;
|
403
|
-
defaultReactionEmoji?: DefaultReaction | null;
|
404
|
-
availableTags?: Array<ForumTag>;
|
405
|
-
defaultSortOrder?: SortOrderTypes | null;
|
406
|
-
defaultForumLayout?: ForumLayoutTypes;
|
407
|
-
defaultThreadRateLimitPerUser?: number;
|
408
|
-
}
|
409
|
-
export type EditGuildChannelPositionsParams = Array<{
|
410
|
-
id: snowflake;
|
411
|
-
position?: number | null;
|
412
|
-
lockPermissions?: boolean | null;
|
413
|
-
parentId?: snowflake | null;
|
414
|
-
}>;
|
415
|
-
export interface AddGuildMemberParams {
|
416
|
-
accessToken: string;
|
417
|
-
nick?: string;
|
418
|
-
roles?: Array<string>;
|
419
|
-
mute?: boolean;
|
420
|
-
deaf?: boolean;
|
421
|
-
}
|
422
|
-
export interface EditCurrentGuildMemberParams {
|
423
|
-
nick?: string;
|
424
|
-
}
|
425
|
-
export interface EditGuildMemberParams {
|
426
|
-
nick?: string | null;
|
427
|
-
roles?: Array<snowflake> | null;
|
428
|
-
mute?: boolean | null;
|
429
|
-
deaf?: boolean | null;
|
430
|
-
channelId?: snowflake | null;
|
431
|
-
communicationDisabledUntil?: number | null;
|
432
|
-
flags?: GuildMemberFlags;
|
433
|
-
}
|
434
|
-
export interface EditGuildMemberParams {
|
435
|
-
nick?: string | null;
|
436
|
-
}
|
437
|
-
export interface CreateGuildBanParams {
|
438
|
-
deleteMessageDays?: number;
|
439
|
-
deleteMessageSeconds?: number;
|
440
|
-
}
|
441
|
-
export interface BulkGuildBanParams {
|
442
|
-
userIds: Array<snowflake>;
|
443
|
-
deleteMessageSeconds?: number;
|
444
|
-
}
|
445
|
-
export interface CreateGuildRoleParams {
|
446
|
-
name?: string;
|
447
|
-
permissions?: string;
|
448
|
-
color?: number;
|
449
|
-
hoist?: boolean;
|
450
|
-
icon?: string | null;
|
451
|
-
unicodeEmoji?: string | null;
|
452
|
-
mentionable?: boolean;
|
453
|
-
}
|
454
|
-
export type EditGuildRolePositionsParams = Array<{
|
455
|
-
id: snowflake;
|
456
|
-
position?: number | null;
|
457
|
-
}>;
|
458
|
-
export interface EditGuildRoleParams {
|
459
|
-
name?: string | null;
|
460
|
-
permissions?: string | null;
|
461
|
-
color?: number | null;
|
462
|
-
hoist?: boolean | null;
|
463
|
-
icon?: string | null;
|
464
|
-
unicodeEmoji?: string | null;
|
465
|
-
mentionable?: boolean | null;
|
466
|
-
}
|
467
|
-
export interface EditGuildMFALevelParams {
|
468
|
-
level: MFALevel;
|
469
|
-
}
|
470
|
-
export interface BeginGuildPruneParams {
|
471
|
-
days: number;
|
472
|
-
computePruneCount: boolean;
|
473
|
-
includeRoles: Array<snowflake>;
|
474
|
-
reason?: string;
|
475
|
-
}
|
476
|
-
export interface EditGuildWelcomeScreenParams {
|
477
|
-
enabled?: boolean | null;
|
478
|
-
welcomeChannels?: Array<WelcomeScreenChannel> | null;
|
479
|
-
description?: string | null;
|
480
|
-
}
|
481
|
-
export interface EditGuildOnboardingParams {
|
482
|
-
prompts: Array<OnboardingPrompt>;
|
483
|
-
defaultChannelIds: Array<snowflake>;
|
484
|
-
enabled: boolean;
|
485
|
-
mode: OnboardingMode;
|
486
|
-
}
|
487
|
-
export interface EditCurrentUserVoiceStateParams {
|
488
|
-
channelId?: snowflake;
|
489
|
-
suppress?: boolean;
|
490
|
-
requestToSpeakTimestamp?: timestamp | null;
|
491
|
-
}
|
492
|
-
export interface EditUserVoiceStateParams {
|
493
|
-
channelId?: snowflake;
|
494
|
-
suppress?: boolean;
|
495
|
-
requestToSpeakTimestamp?: timestamp | null;
|
496
|
-
}
|
@@ -1,21 +1,23 @@
|
|
1
|
-
import type { ApplicationCommandOptionType, ApplicationCommandTypes, ComponentTypes, InteractionCallbackType, InteractionType, MessageFlags } from "../constants";
|
1
|
+
import type { ApplicationCommandOptionType, ApplicationCommandTypes, ApplicationIntegrationTypes, ComponentTypes, InteractionCallbackType, InteractionContextTypes, InteractionType, Locales, MessageFlags } from "../constants";
|
2
2
|
import type { File } from "../rest";
|
3
3
|
import type { RawApplicationCommandOptionChoice, ApplicationCommandOptionChoice } from "./application-command";
|
4
4
|
import type { RawChannel, RawMessage, RawAttachment, RawEmbed, RawAllowedMentions, Channel, Message, Attachment, Embed, AllowedMentions } from "./channel";
|
5
5
|
import type { snowflake } from "./common";
|
6
6
|
import type { RawEntitlement, Entitlement } from "./entitlements";
|
7
|
-
import type { RawGuildMember, GuildMember } from "./guild";
|
7
|
+
import type { RawGuildMember, GuildMember, Guild, RawGuild } from "./guild";
|
8
8
|
import type { RawTextInput, RawActionRow, TextInput, ActionRow } from "./message-components";
|
9
9
|
import type { RawPollCreateParams, PollCreateParams } from "./poll";
|
10
10
|
import type { RawRole, Role } from "./role";
|
11
11
|
import type { RawUser, User } from "./user";
|
12
|
-
import type { ExecuteWebhookParams } from "./webhook";
|
13
12
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
|
14
13
|
export interface RawInteraction {
|
15
14
|
id: snowflake;
|
16
15
|
application_id: snowflake;
|
17
16
|
type: InteractionType;
|
18
17
|
data?: RawApplicationCommandData & RawMessageComponentData & RawModalSubmitData;
|
18
|
+
guild?: {
|
19
|
+
locale: Locales;
|
20
|
+
} & Pick<RawGuild, "id" | "features">;
|
19
21
|
guild_id?: snowflake;
|
20
22
|
channel?: RawChannel;
|
21
23
|
channel_id?: snowflake;
|
@@ -28,6 +30,8 @@ export interface RawInteraction {
|
|
28
30
|
locale?: string;
|
29
31
|
guild_locale?: string;
|
30
32
|
entitlements: Array<RawEntitlement>;
|
33
|
+
authorizing_integration_owners: Record<ApplicationIntegrationTypes, string>;
|
34
|
+
context?: InteractionContextTypes;
|
31
35
|
}
|
32
36
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-data-structure */
|
33
37
|
export interface RawApplicationCommandData {
|
@@ -104,6 +108,9 @@ export interface Interaction {
|
|
104
108
|
applicationId: snowflake;
|
105
109
|
type: InteractionType;
|
106
110
|
data?: ApplicationCommandData & MessageComponentData & ModalSubmitData;
|
111
|
+
guild?: {
|
112
|
+
locale: Locales;
|
113
|
+
} & Pick<Guild, "id" | "features">;
|
107
114
|
guildId?: snowflake;
|
108
115
|
channel?: Channel;
|
109
116
|
channelId?: snowflake;
|
@@ -116,6 +123,8 @@ export interface Interaction {
|
|
116
123
|
locale?: string;
|
117
124
|
guildLocale?: string;
|
118
125
|
entitlements: Array<Entitlement>;
|
126
|
+
authorizingIntegrationOwners: Record<ApplicationIntegrationTypes, string>;
|
127
|
+
context?: InteractionContextTypes;
|
119
128
|
}
|
120
129
|
export interface ApplicationCommandData {
|
121
130
|
id: snowflake;
|
@@ -179,5 +188,3 @@ export interface InteractionCallbackData {
|
|
179
188
|
customId?: string;
|
180
189
|
title?: string;
|
181
190
|
}
|
182
|
-
export interface CreateInteractionFollowupMessageParams extends Omit<ExecuteWebhookParams, "threadId" | "avatarUrl" | "username"> {
|
183
|
-
}
|
@@ -19,14 +19,3 @@ export interface StageInstance {
|
|
19
19
|
discoverableDisabled: boolean;
|
20
20
|
guildScheduledEventId: snowflake | null;
|
21
21
|
}
|
22
|
-
export interface CreateStageInstanceParams {
|
23
|
-
channelId: snowflake;
|
24
|
-
topic: string;
|
25
|
-
privacyLevel?: PrivacyLevel;
|
26
|
-
sendStartNotifications?: boolean;
|
27
|
-
guildScheduledEventId?: snowflake;
|
28
|
-
}
|
29
|
-
export interface EditStageInstanceParams {
|
30
|
-
topic?: string;
|
31
|
-
privacyLevel?: PrivacyLevel;
|
32
|
-
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import type { StickerTypes, StickerFormatTypes } from "../constants";
|
2
|
-
import type { File } from "../rest";
|
3
2
|
import type { snowflake } from "./common";
|
4
3
|
import type { RawUser, User } from "./user";
|
5
4
|
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-structure */
|
@@ -61,14 +60,3 @@ export interface StickerPack {
|
|
61
60
|
description: string;
|
62
61
|
bannerAssetId?: snowflake;
|
63
62
|
}
|
64
|
-
export interface CreateGuildStickerParams {
|
65
|
-
name: string;
|
66
|
-
description: string;
|
67
|
-
tags: string;
|
68
|
-
file: File;
|
69
|
-
}
|
70
|
-
export interface EditGuildStickerParams {
|
71
|
-
name?: string;
|
72
|
-
description?: string | null;
|
73
|
-
tags?: string;
|
74
|
-
}
|
package/dist/lib/types/user.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { UserFlags, Services, VisibilityTypes, PremiumTypes
|
1
|
+
import type { UserFlags, Services, VisibilityTypes, PremiumTypes } from "../constants";
|
2
2
|
import type { RawApplicationRoleConnectionMetadata, ApplicationRoleConnectionMetadata } from "./application-role-connection-metadata";
|
3
|
-
import type { snowflake
|
3
|
+
import type { snowflake } from "./common";
|
4
4
|
import type { RawIntegration, Integration } from "./guild";
|
5
5
|
/** https://discord.com/developers/docs/resources/user#user-object-user-structure */
|
6
6
|
export interface RawUser {
|
@@ -86,27 +86,3 @@ export interface ApplicationRoleConnection {
|
|
86
86
|
platformUsername: string | null;
|
87
87
|
metadata: ApplicationRoleConnectionMetadata;
|
88
88
|
}
|
89
|
-
export interface EditCurrentUserParams {
|
90
|
-
username?: string;
|
91
|
-
avatar?: string | null;
|
92
|
-
banner?: string | null;
|
93
|
-
}
|
94
|
-
export interface CreateDMParams {
|
95
|
-
recipientId: snowflake;
|
96
|
-
}
|
97
|
-
export interface CreateGroupDMParams {
|
98
|
-
accessTokens: Array<string>;
|
99
|
-
nicks: Array<string>;
|
100
|
-
}
|
101
|
-
export interface UpdateCurrentUserApplicationRoleConnection {
|
102
|
-
platformName?: string;
|
103
|
-
platformUsername?: string;
|
104
|
-
metadata?: {
|
105
|
-
type: ApplicationRoleConnectionMetadataType;
|
106
|
-
key: string;
|
107
|
-
name: string;
|
108
|
-
nameLocalizations?: LocaleMap | null;
|
109
|
-
description: string;
|
110
|
-
descriptionLocalizations?: LocaleMap | null;
|
111
|
-
};
|
112
|
-
}
|
@@ -1,10 +1,7 @@
|
|
1
|
-
import type {
|
2
|
-
import type {
|
3
|
-
import type { RawChannel, Channel, Embed, AllowedMentions, Attachment } from "./channel";
|
1
|
+
import type { WebhookTypes } from "../constants";
|
2
|
+
import type { RawChannel, Channel } from "./channel";
|
4
3
|
import type { snowflake } from "./common";
|
5
4
|
import type { RawGuild, Guild } from "./guild";
|
6
|
-
import type { ActionRow } from "./message-components";
|
7
|
-
import type { PollCreateParams } from "./poll";
|
8
5
|
import type { RawUser, User } from "./user";
|
9
6
|
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure */
|
10
7
|
export interface RawWebhook {
|
@@ -35,36 +32,3 @@ export interface Webhook {
|
|
35
32
|
sourceChannel?: Channel;
|
36
33
|
url?: string;
|
37
34
|
}
|
38
|
-
export interface CreateWebhookParams {
|
39
|
-
name: string;
|
40
|
-
avatar?: string | null;
|
41
|
-
}
|
42
|
-
export interface EditWebhookParams {
|
43
|
-
name?: string;
|
44
|
-
avatar?: string | null;
|
45
|
-
channelId?: snowflake;
|
46
|
-
}
|
47
|
-
export interface ExecuteWebhookParams {
|
48
|
-
content?: string | null;
|
49
|
-
username?: string;
|
50
|
-
avatarUrl?: string;
|
51
|
-
tts?: boolean;
|
52
|
-
embeds?: Array<Embed> | null;
|
53
|
-
allowedMentions?: AllowedMentions | null;
|
54
|
-
components?: Array<ActionRow> | null;
|
55
|
-
files?: Array<File> | null;
|
56
|
-
attachments?: Array<Attachment> | null;
|
57
|
-
flags?: MessageFlags | null;
|
58
|
-
threadName?: string;
|
59
|
-
appliedTags?: Array<string>;
|
60
|
-
poll?: PollCreateParams;
|
61
|
-
}
|
62
|
-
export interface EditWebhookMessageParams {
|
63
|
-
content?: string | null;
|
64
|
-
embeds?: Array<Embed> | null;
|
65
|
-
flags?: MessageFlags | null;
|
66
|
-
allowedMentions?: AllowedMentions | null;
|
67
|
-
components?: Array<ActionRow> | null;
|
68
|
-
files?: Array<File> | null;
|
69
|
-
attachments?: Array<Attachment> | null;
|
70
|
-
}
|
package/dist/lib/utils/Util.d.ts
CHANGED
@@ -1,4 +1,94 @@
|
|
1
|
+
import type { Application, RawApplication } from "../types/application";
|
2
|
+
import type { ApplicationCommand, GuildApplicationCommandPermissions, RawApplicationCommand, RawGuildApplicationCommandPermissions } from "../types/application-command";
|
3
|
+
import type { AutoModerationRule, RawAutoModerationRule } from "../types/auto-moderation";
|
4
|
+
import type { Attachment, Channel, Embed, Message, MessageInteractionMetadata, RawAttachment, RawChannel, RawEmbed, RawMessage, RawMessageInteractionMetadata, RawThreadMember, ThreadMember } from "../types/channel";
|
5
|
+
import type { Emoji, RawEmoji } from "../types/emoji";
|
6
|
+
import type { Guild, GuildMember, Integration, RawGuild, RawGuildMember, RawIntegration } from "../types/guild";
|
7
|
+
import type { GuildScheduledEvent, RawGuildScheduledEvent } from "../types/guild-scheduled-event";
|
8
|
+
import type { GuildTemplate, RawGuildTemplate } from "../types/guild-template";
|
9
|
+
import type { Invite, RawInvite } from "../types/invite";
|
10
|
+
import type { RawUser, User } from "../types/user";
|
11
|
+
import type { Poll, RawPoll } from "../types/poll";
|
12
|
+
import type { RawStageInstance, StageInstance } from "../types/stage-instance";
|
13
|
+
import type { RawSticker, Sticker } from "../types/sticker";
|
14
|
+
import type { RawVoiceState, VoiceState } from "../types/voice";
|
15
|
+
import type { RawWebhook, Webhook } from "../types/webhook";
|
16
|
+
import type { RawTeam, Team } from "../types/team";
|
17
|
+
import type { RawRole, Role } from "../types/role";
|
18
|
+
import type { ActionRow, RawActionRow } from "../types/message-components";
|
19
|
+
import type { Interaction, RawInteraction, RawResolvedData, ResolvedData } from "../types/interaction";
|
20
|
+
import type { Entitlement, RawEntitlement } from "../types/entitlements";
|
21
|
+
import type { AuditLog, AuditLogEntry, RawAuditLog, RawAuditLogEntry } from "../types/audit-log";
|
22
|
+
import type { RawSku, Sku } from "../types/sku";
|
23
|
+
import type { PresenceUpdateEventFields, RawPresenceUpdateEventFields } from "../types/gateway-events";
|
1
24
|
export declare class Util {
|
2
|
-
|
3
|
-
|
25
|
+
auditLogFromRaw(auditLog: RawAuditLog): AuditLog;
|
26
|
+
auditLogToRaw(auditLog: AuditLog): RawAuditLog;
|
27
|
+
auditLogEntryFromRaw(auditLogEntry: RawAuditLogEntry): AuditLogEntry;
|
28
|
+
auditLogEntryToRaw(auditLogEntry: AuditLogEntry): RawAuditLogEntry;
|
29
|
+
autoModerationRuleFromRaw(autoModerationRule: RawAutoModerationRule): AutoModerationRule;
|
30
|
+
autoModerationRuleToRaw(autoModerationRule: AutoModerationRule): RawAutoModerationRule;
|
31
|
+
attachmentFromRaw(attachment: RawAttachment): Attachment;
|
32
|
+
attachmentToRaw(attachment: Attachment): RawAttachment;
|
33
|
+
applicationFromRaw(application: RawApplication): Application;
|
34
|
+
applicationToRaw(application: Application): RawApplication;
|
35
|
+
applicationCommandFromRaw(applicationCommand: RawApplicationCommand): ApplicationCommand;
|
36
|
+
applicationCommandToRaw(applicationCommand: ApplicationCommand): RawApplicationCommand;
|
37
|
+
channelFromRaw(channel: RawChannel): Channel;
|
38
|
+
channelToRaw(channel: Channel): RawChannel;
|
39
|
+
embedFromRaw(embed: RawEmbed): Embed;
|
40
|
+
embedToRaw(embed: Embed): RawEmbed;
|
41
|
+
emojiFromRaw(emoji: RawEmoji): Emoji;
|
42
|
+
emojiToRaw(emoji: Emoji): RawEmoji;
|
43
|
+
entitlementFromRaw(entitlement: RawEntitlement): Entitlement;
|
44
|
+
entitlementToRaw(entitlement: Entitlement): RawEntitlement;
|
45
|
+
guildApplicationCommandPermissionsFromRaw(guildApplicationCommandPermissions: RawGuildApplicationCommandPermissions): GuildApplicationCommandPermissions;
|
46
|
+
guildApplicationCommandPermissionsToRaw(guildApplicationCommandPermissions: GuildApplicationCommandPermissions): RawGuildApplicationCommandPermissions;
|
47
|
+
guildFromRaw(guild: RawGuild): Guild;
|
48
|
+
guildToRaw(guild: Guild): RawGuild;
|
49
|
+
guildMemberFromRaw(guildMember: RawGuildMember): GuildMember;
|
50
|
+
guildMemberToRaw(guildMember: GuildMember): RawGuildMember;
|
51
|
+
guildScheduledEventFromRaw(guildScheduledEvent: RawGuildScheduledEvent): GuildScheduledEvent;
|
52
|
+
guildScheduledEventToRaw(guildScheduledEvent: GuildScheduledEvent): RawGuildScheduledEvent;
|
53
|
+
guildTemplateFromRaw(guildTemplate: RawGuildTemplate): GuildTemplate;
|
54
|
+
guildTemplateToRaw(guildTemplate: GuildTemplate): RawGuildTemplate;
|
55
|
+
integrationFromRaw(integration: RawIntegration): Integration;
|
56
|
+
integrationToRaw(integration: Integration): RawIntegration;
|
57
|
+
interactionFromRaw(interaction: RawInteraction): Interaction;
|
58
|
+
interactionToRaw(interaction: Interaction): RawInteraction;
|
59
|
+
interactionMetadataFromRaw(interactionMetadata: RawMessageInteractionMetadata): MessageInteractionMetadata;
|
60
|
+
interactionMetadataToRaw(interactionMetadata: MessageInteractionMetadata): RawMessageInteractionMetadata;
|
61
|
+
inviteFromRaw(invite: RawInvite): Invite;
|
62
|
+
inviteToRaw(invite: Invite): RawInvite;
|
63
|
+
messageComponentsFromRaw(components: Array<RawActionRow>): Array<ActionRow>;
|
64
|
+
messageComponentsToRaw(components: Array<ActionRow>): Array<RawActionRow>;
|
65
|
+
messageFromRaw(message: RawMessage): Message;
|
66
|
+
messageToRaw(message: Message): RawMessage;
|
67
|
+
partialApplicationCommandToRaw(applicationCommand: Partial<ApplicationCommand>): Partial<RawApplicationCommand>;
|
68
|
+
presenceFromRaw(presence: RawPresenceUpdateEventFields): PresenceUpdateEventFields;
|
69
|
+
presenceToRaw(presence: PresenceUpdateEventFields): RawPresenceUpdateEventFields;
|
70
|
+
resolvedDataFromRaw(resolvedData: RawResolvedData): ResolvedData;
|
71
|
+
resolvedDataToRaw(resolvedData: ResolvedData): RawResolvedData;
|
72
|
+
pollFromRaw(poll: RawPoll): Poll;
|
73
|
+
pollToRaw(poll: Poll): RawPoll;
|
74
|
+
roleFromRaw(role: RawRole): Role;
|
75
|
+
roleToRaw(role: Role): RawRole;
|
76
|
+
skuFromRaw(sku: RawSku): Sku;
|
77
|
+
skuToRaw(sku: Sku): RawSku;
|
78
|
+
stageInstanceFromRaw(stageInstance: RawStageInstance): StageInstance;
|
79
|
+
stageInstanceToRaw(stageInstance: StageInstance): RawStageInstance;
|
80
|
+
stickerFromRaw(sticker: RawSticker): Sticker;
|
81
|
+
stickerToRaw(sticker: Sticker): RawSticker;
|
82
|
+
teamFromRaw(team: RawTeam): Team;
|
83
|
+
teamToRaw(team: Team): RawTeam;
|
84
|
+
threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
|
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">;
|
88
|
+
userFromRaw(user: RawUser): User;
|
89
|
+
userToRaw(user: User): RawUser;
|
90
|
+
voiceStateFromRaw(voiceState: RawVoiceState): VoiceState;
|
91
|
+
voiceStateToRaw(voiceState: VoiceState): RawVoiceState;
|
92
|
+
webhookFromRaw(webhook: RawWebhook): Webhook;
|
93
|
+
webhookToRaw(webhook: Webhook): RawWebhook;
|
4
94
|
}
|