discord.js 15.0.0-dev.1751544353-e6d59eaf9 → 15.0.0-dev.1751674420-42fbca83c
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/package.json +5 -5
- package/typings/index.d.mts +169 -125
- package/typings/index.d.ts +169 -125
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "discord.js",
|
|
4
|
-
"version": "15.0.0-dev.
|
|
4
|
+
"version": "15.0.0-dev.1751674420-42fbca83c",
|
|
5
5
|
"description": "A powerful library for interacting with the Discord API",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"types": "./typings/index.d.ts",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"tslib": "^2.8.1",
|
|
63
63
|
"undici": "7.8.0",
|
|
64
64
|
"@discordjs/builders": "^1.11.1",
|
|
65
|
-
"@discordjs/formatters": "^0.6.1",
|
|
66
65
|
"@discordjs/collection": "^2.1.1",
|
|
67
66
|
"@discordjs/rest": "^2.5.0",
|
|
68
67
|
"@discordjs/util": "^1.1.1",
|
|
69
|
-
"@discordjs/ws": "^2.0.2"
|
|
68
|
+
"@discordjs/ws": "^2.0.2",
|
|
69
|
+
"@discordjs/formatters": "^0.6.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@favware/cliff-jumper": "^4.1.0",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"turbo": "^2.5.2",
|
|
85
85
|
"typescript": "~5.8.3",
|
|
86
86
|
"@discordjs/api-extractor": "^7.52.7",
|
|
87
|
-
"@discordjs/
|
|
88
|
-
"@discordjs/
|
|
87
|
+
"@discordjs/docgen": "^0.12.1",
|
|
88
|
+
"@discordjs/scripts": "^0.1.0"
|
|
89
89
|
},
|
|
90
90
|
"engines": {
|
|
91
91
|
"node": ">=22.12.0"
|
package/typings/index.d.mts
CHANGED
|
@@ -564,9 +564,7 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
|
|
|
564
564
|
| ModalComponentData,
|
|
565
565
|
options?: ShowModalOptions,
|
|
566
566
|
): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
|
|
567
|
-
public awaitModalSubmit(
|
|
568
|
-
options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
|
|
569
|
-
): Promise<ModalSubmitInteraction<Cached>>;
|
|
567
|
+
public awaitModalSubmit(options: AwaitModalSubmitOptions): Promise<ModalSubmitInteraction<Cached>>;
|
|
570
568
|
private transformOption(
|
|
571
569
|
option: APIApplicationCommandOption,
|
|
572
570
|
resolved: Extract<APIApplicationCommandInteractionData, { resolved: any }>['resolved'],
|
|
@@ -603,7 +601,14 @@ export class BaseGuildEmoji extends Emoji {
|
|
|
603
601
|
public requiresColons: boolean | null;
|
|
604
602
|
}
|
|
605
603
|
|
|
606
|
-
export interface BaseGuildTextChannel
|
|
604
|
+
export interface BaseGuildTextChannel
|
|
605
|
+
extends TextBasedChannelFields<true>,
|
|
606
|
+
PinnableChannelFields,
|
|
607
|
+
WebhookChannelFields,
|
|
608
|
+
BulkDeleteMethod,
|
|
609
|
+
SetRateLimitPerUserMethod,
|
|
610
|
+
MessageChannelFields,
|
|
611
|
+
SendMethod<true> {}
|
|
607
612
|
export class BaseGuildTextChannel extends GuildChannel {
|
|
608
613
|
protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean);
|
|
609
614
|
public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
|
|
@@ -623,7 +628,13 @@ export class BaseGuildTextChannel extends GuildChannel {
|
|
|
623
628
|
public setType(type: ChannelType.GuildAnnouncement, reason?: string): Promise<AnnouncementChannel>;
|
|
624
629
|
}
|
|
625
630
|
|
|
626
|
-
export interface BaseGuildVoiceChannel
|
|
631
|
+
export interface BaseGuildVoiceChannel
|
|
632
|
+
extends TextBasedChannelFields<true>,
|
|
633
|
+
WebhookChannelFields,
|
|
634
|
+
BulkDeleteMethod,
|
|
635
|
+
SetRateLimitPerUserMethod,
|
|
636
|
+
MessageChannelFields,
|
|
637
|
+
SendMethod<true> {}
|
|
627
638
|
export class BaseGuildVoiceChannel extends GuildChannel {
|
|
628
639
|
public constructor(guild: Guild, data?: RawGuildChannelData);
|
|
629
640
|
public bitrate: number;
|
|
@@ -774,12 +785,20 @@ export interface IconData {
|
|
|
774
785
|
proxyIconURL?: string;
|
|
775
786
|
}
|
|
776
787
|
|
|
777
|
-
export interface EmbedAuthorData extends
|
|
788
|
+
export interface EmbedAuthorData extends IconData {
|
|
789
|
+
name: string;
|
|
790
|
+
url?: string;
|
|
791
|
+
}
|
|
778
792
|
|
|
779
|
-
export interface EmbedFooterData extends
|
|
793
|
+
export interface EmbedFooterData extends IconData {
|
|
794
|
+
text: string;
|
|
795
|
+
}
|
|
780
796
|
|
|
781
|
-
export interface EmbedAssetData
|
|
797
|
+
export interface EmbedAssetData {
|
|
798
|
+
height?: number;
|
|
782
799
|
proxyURL?: string;
|
|
800
|
+
url: string;
|
|
801
|
+
width?: number;
|
|
783
802
|
}
|
|
784
803
|
|
|
785
804
|
export class Embed {
|
|
@@ -897,7 +916,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient<ClientEv
|
|
|
897
916
|
public channels: ChannelManager;
|
|
898
917
|
public guilds: GuildManager;
|
|
899
918
|
public lastPingTimestamps: ReadonlyCollection<number, number>;
|
|
900
|
-
public options:
|
|
919
|
+
public options: ClientOptions & { intents: IntentsBitField };
|
|
901
920
|
public get ping(): number | null;
|
|
902
921
|
public get readyAt(): If<Ready, Date>;
|
|
903
922
|
public readyTimestamp: If<Ready, number>;
|
|
@@ -1245,10 +1264,10 @@ export class PrimaryEntryPointCommandInteraction<
|
|
|
1245
1264
|
}
|
|
1246
1265
|
|
|
1247
1266
|
export interface DMChannel
|
|
1248
|
-
extends
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1267
|
+
extends TextBasedChannelFields<false, true>,
|
|
1268
|
+
PinnableChannelFields,
|
|
1269
|
+
MessageChannelFields,
|
|
1270
|
+
SendMethod<false> {}
|
|
1252
1271
|
export class DMChannel extends BaseChannel {
|
|
1253
1272
|
private constructor(client: Client<true>, data?: RawDMChannelData);
|
|
1254
1273
|
public flags: Readonly<ChannelFlagsBitField>;
|
|
@@ -1592,7 +1611,7 @@ export class GuildMemberFlagsBitField extends BitField<GuildMemberFlagsString> {
|
|
|
1592
1611
|
public static resolve(bit?: BitFieldResolvable<GuildMemberFlagsString, GuildMemberFlags>): number;
|
|
1593
1612
|
}
|
|
1594
1613
|
|
|
1595
|
-
export interface GuildMember extends
|
|
1614
|
+
export interface GuildMember extends SendMethod<false> {}
|
|
1596
1615
|
export class GuildMember extends Base {
|
|
1597
1616
|
private constructor(client: Client<true>, data: unknown, guild: Guild);
|
|
1598
1617
|
private readonly _roles: Snowflake[];
|
|
@@ -2095,10 +2114,7 @@ export interface MessageChannelCollectorOptionsParams<
|
|
|
2095
2114
|
export interface AwaitMessageCollectorOptionsParams<
|
|
2096
2115
|
ComponentType extends MessageComponentType,
|
|
2097
2116
|
Cached extends boolean = boolean,
|
|
2098
|
-
> extends
|
|
2099
|
-
InteractionCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]>,
|
|
2100
|
-
keyof AwaitMessageComponentOptions<any>
|
|
2101
|
-
> {
|
|
2117
|
+
> extends AwaitMessageComponentOptions<MappedInteractionTypes<Cached>[ComponentType]> {
|
|
2102
2118
|
componentType?: ComponentType;
|
|
2103
2119
|
}
|
|
2104
2120
|
|
|
@@ -2347,9 +2363,7 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
|
|
|
2347
2363
|
| ModalComponentData,
|
|
2348
2364
|
options?: ShowModalOptions,
|
|
2349
2365
|
): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
|
|
2350
|
-
public awaitModalSubmit(
|
|
2351
|
-
options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
|
|
2352
|
-
): Promise<ModalSubmitInteraction<Cached>>;
|
|
2366
|
+
public awaitModalSubmit(options: AwaitModalSubmitOptions): Promise<ModalSubmitInteraction<Cached>>;
|
|
2353
2367
|
}
|
|
2354
2368
|
|
|
2355
2369
|
export class MessageContextMenuCommandInteraction<
|
|
@@ -2601,19 +2615,7 @@ export class OAuth2Guild extends BaseGuild {
|
|
|
2601
2615
|
public permissions: Readonly<PermissionsBitField>;
|
|
2602
2616
|
}
|
|
2603
2617
|
|
|
2604
|
-
export interface PartialGroupDMChannel
|
|
2605
|
-
extends Omit<
|
|
2606
|
-
TextBasedChannelFields<false, false>,
|
|
2607
|
-
| 'awaitMessages'
|
|
2608
|
-
| 'bulkDelete'
|
|
2609
|
-
| 'createMessageCollector'
|
|
2610
|
-
| 'createWebhook'
|
|
2611
|
-
| 'fetchWebhooks'
|
|
2612
|
-
| 'send'
|
|
2613
|
-
| 'sendTyping'
|
|
2614
|
-
| 'setNSFW'
|
|
2615
|
-
| 'setRateLimitPerUser'
|
|
2616
|
-
> {}
|
|
2618
|
+
export interface PartialGroupDMChannel extends TextBasedChannelFields<false, false>, PinnableChannelFields {}
|
|
2617
2619
|
export class PartialGroupDMChannel extends BaseChannel {
|
|
2618
2620
|
private constructor(client: Client<true>, data: RawPartialGroupDMChannelData);
|
|
2619
2621
|
public type: ChannelType.GroupDM;
|
|
@@ -2648,20 +2650,7 @@ export interface DefaultReactionEmoji {
|
|
|
2648
2650
|
name: string | null;
|
|
2649
2651
|
}
|
|
2650
2652
|
|
|
2651
|
-
export interface ThreadOnlyChannel
|
|
2652
|
-
extends Omit<
|
|
2653
|
-
TextBasedChannelFields,
|
|
2654
|
-
| 'awaitMessageComponent'
|
|
2655
|
-
| 'awaitMessages'
|
|
2656
|
-
| 'bulkDelete'
|
|
2657
|
-
| 'createMessageCollector'
|
|
2658
|
-
| 'createMessageComponentCollector'
|
|
2659
|
-
| 'lastMessage'
|
|
2660
|
-
| 'lastPinAt'
|
|
2661
|
-
| 'messages'
|
|
2662
|
-
| 'send'
|
|
2663
|
-
| 'sendTyping'
|
|
2664
|
-
> {}
|
|
2653
|
+
export interface ThreadOnlyChannel extends WebhookChannelFields, SetRateLimitPerUserMethod {}
|
|
2665
2654
|
export abstract class ThreadOnlyChannel extends GuildChannel {
|
|
2666
2655
|
public type: ChannelType.GuildForum | ChannelType.GuildMedia;
|
|
2667
2656
|
public threads: GuildForumThreadManager;
|
|
@@ -3392,7 +3381,12 @@ export interface PrivateThreadChannel extends ThreadChannel<false> {
|
|
|
3392
3381
|
}
|
|
3393
3382
|
|
|
3394
3383
|
export interface ThreadChannel<ThreadOnly extends boolean = boolean>
|
|
3395
|
-
extends
|
|
3384
|
+
extends TextBasedChannelFields<true>,
|
|
3385
|
+
PinnableChannelFields,
|
|
3386
|
+
BulkDeleteMethod,
|
|
3387
|
+
SetRateLimitPerUserMethod,
|
|
3388
|
+
MessageChannelFields,
|
|
3389
|
+
SendMethod<true> {}
|
|
3396
3390
|
export class ThreadChannel<ThreadOnly extends boolean = boolean> extends BaseChannel {
|
|
3397
3391
|
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client<true>);
|
|
3398
3392
|
public archived: boolean | null;
|
|
@@ -3513,7 +3507,7 @@ export class UnfurledMediaItem {
|
|
|
3513
3507
|
public get url(): string;
|
|
3514
3508
|
}
|
|
3515
3509
|
|
|
3516
|
-
export interface User extends
|
|
3510
|
+
export interface User extends SendMethod<false> {}
|
|
3517
3511
|
export class User extends Base {
|
|
3518
3512
|
protected constructor(client: Client<true>, data: unknown);
|
|
3519
3513
|
private _equals(user: APIUser): boolean;
|
|
@@ -4036,7 +4030,7 @@ export class ApplicationCommandManager<
|
|
|
4036
4030
|
guildId: Snowflake,
|
|
4037
4031
|
): Promise<ApplicationCommand>;
|
|
4038
4032
|
public fetch(
|
|
4039
|
-
options: Snowflake | (
|
|
4033
|
+
options: Snowflake | (FetchGuildApplicationCommandFetchOptions & { id: Snowflake }),
|
|
4040
4034
|
): Promise<ApplicationCommandScope>;
|
|
4041
4035
|
public fetch(
|
|
4042
4036
|
options: FetchApplicationCommandOptions & { guildId: Snowflake; id: Snowflake },
|
|
@@ -4199,7 +4193,11 @@ export class SubscriptionManager extends CachedManager<Snowflake, Subscription,
|
|
|
4199
4193
|
public fetch(options: FetchSubscriptionsOptions): Promise<Collection<Snowflake, Subscription>>;
|
|
4200
4194
|
}
|
|
4201
4195
|
|
|
4202
|
-
export interface FetchGuildApplicationCommandFetchOptions extends
|
|
4196
|
+
export interface FetchGuildApplicationCommandFetchOptions extends BaseFetchOptions {
|
|
4197
|
+
id?: Snowflake;
|
|
4198
|
+
locale?: Locale;
|
|
4199
|
+
withLocalizations?: boolean;
|
|
4200
|
+
}
|
|
4203
4201
|
|
|
4204
4202
|
export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> {
|
|
4205
4203
|
private constructor(guild: Guild, iterable?: Iterable<APIApplicationCommand>);
|
|
@@ -4416,7 +4414,9 @@ export interface FetchGuildSoundboardSoundOptions extends BaseFetchOptions {
|
|
|
4416
4414
|
soundboardSound: SoundboardSoundResolvable;
|
|
4417
4415
|
}
|
|
4418
4416
|
|
|
4419
|
-
export interface FetchGuildSoundboardSoundsOptions
|
|
4417
|
+
export interface FetchGuildSoundboardSoundsOptions {
|
|
4418
|
+
cache?: boolean;
|
|
4419
|
+
}
|
|
4420
4420
|
|
|
4421
4421
|
export class GuildSoundboardSoundManager extends CachedManager<Snowflake, SoundboardSound, SoundboardSoundResolvable> {
|
|
4422
4422
|
private constructor(guild: Guild, iterable?: Iterable<APISoundboardSound>);
|
|
@@ -4658,34 +4658,48 @@ export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, type
|
|
|
4658
4658
|
|
|
4659
4659
|
export type Constructable<Entity> = abstract new (...args: any[]) => Entity;
|
|
4660
4660
|
|
|
4661
|
-
export interface
|
|
4661
|
+
export interface SendMethod<InGuild extends boolean = boolean> {
|
|
4662
4662
|
send(options: MessageCreateOptions | MessagePayload | string): Promise<Message<InGuild>>;
|
|
4663
4663
|
}
|
|
4664
4664
|
|
|
4665
|
-
export interface
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4665
|
+
export interface PinnableChannelFields {
|
|
4666
|
+
get lastPinAt(): Date | null;
|
|
4667
|
+
lastPinTimestamp: number | null;
|
|
4668
|
+
}
|
|
4669
|
+
|
|
4670
|
+
export interface BulkDeleteMethod {
|
|
4671
4671
|
bulkDelete(
|
|
4672
4672
|
messages: Collection<Snowflake, Message> | number | readonly MessageResolvable[],
|
|
4673
4673
|
filterOld?: boolean,
|
|
4674
4674
|
): Promise<Snowflake[]>;
|
|
4675
|
+
}
|
|
4676
|
+
|
|
4677
|
+
export interface SetRateLimitPerUserMethod {
|
|
4678
|
+
setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4681
|
+
export interface WebhookChannelFields {
|
|
4682
|
+
createWebhook(options: ChannelWebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>;
|
|
4683
|
+
fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>;
|
|
4684
|
+
setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
|
|
4685
|
+
}
|
|
4686
|
+
|
|
4687
|
+
export interface MessageChannelFields {
|
|
4688
|
+
awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>;
|
|
4675
4689
|
createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
|
|
4690
|
+
sendTyping(): Promise<void>;
|
|
4691
|
+
}
|
|
4692
|
+
|
|
4693
|
+
export interface TextBasedChannelFields<InGuild extends boolean = boolean, InDM extends boolean = boolean> {
|
|
4694
|
+
awaitMessageComponent<ComponentType extends MessageComponentType>(
|
|
4695
|
+
options?: AwaitMessageCollectorOptionsParams<ComponentType, true>,
|
|
4696
|
+
): Promise<MappedInteractionTypes[ComponentType]>;
|
|
4676
4697
|
createMessageComponentCollector<ComponentType extends MessageComponentType>(
|
|
4677
4698
|
options?: MessageChannelCollectorOptionsParams<ComponentType, true>,
|
|
4678
4699
|
): InteractionCollector<MappedInteractionTypes[ComponentType]>;
|
|
4679
|
-
createWebhook(options: ChannelWebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>;
|
|
4680
|
-
fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>;
|
|
4681
4700
|
get lastMessage(): Message | null;
|
|
4682
4701
|
lastMessageId: Snowflake | null;
|
|
4683
|
-
get lastPinAt(): Date | null;
|
|
4684
|
-
lastPinTimestamp: number | null;
|
|
4685
4702
|
messages: If<InGuild, GuildMessageManager, If<InDM, DMMessageManager, PartialGroupDMMessageManager>>;
|
|
4686
|
-
sendTyping(): Promise<void>;
|
|
4687
|
-
setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
|
|
4688
|
-
setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
|
|
4689
4703
|
}
|
|
4690
4704
|
|
|
4691
4705
|
export interface PartialWebhookFields {
|
|
@@ -4714,16 +4728,17 @@ export interface WebhookFields extends PartialWebhookFields {
|
|
|
4714
4728
|
|
|
4715
4729
|
// #region Typedefs
|
|
4716
4730
|
|
|
4717
|
-
export interface ActivitiesOptions
|
|
4718
|
-
|
|
4719
|
-
export interface ActivityOptions {
|
|
4731
|
+
export interface ActivitiesOptions {
|
|
4720
4732
|
name: string;
|
|
4721
|
-
shardId?: number | readonly number[];
|
|
4722
4733
|
state?: string;
|
|
4723
4734
|
type?: ActivityType;
|
|
4724
4735
|
url?: string;
|
|
4725
4736
|
}
|
|
4726
4737
|
|
|
4738
|
+
export interface ActivityOptions extends ActivitiesOptions {
|
|
4739
|
+
shardId?: number | readonly number[];
|
|
4740
|
+
}
|
|
4741
|
+
|
|
4727
4742
|
export interface AddGuildMemberOptions {
|
|
4728
4743
|
accessToken: string;
|
|
4729
4744
|
deaf?: boolean;
|
|
@@ -4785,12 +4800,13 @@ export type CommandOptionNonChoiceResolvableType = Exclude<
|
|
|
4785
4800
|
CommandOptionChannelResolvableType | CommandOptionChoiceResolvableType | CommandOptionSubOptionResolvableType
|
|
4786
4801
|
>;
|
|
4787
4802
|
|
|
4788
|
-
export interface
|
|
4789
|
-
autocomplete?: never;
|
|
4803
|
+
export interface CommonBaseApplicationCommandOptionsData {
|
|
4790
4804
|
description: string;
|
|
4791
4805
|
descriptionLocalizations?: LocalizationMap;
|
|
4792
4806
|
name: string;
|
|
4793
4807
|
nameLocalizations?: LocalizationMap;
|
|
4808
|
+
}
|
|
4809
|
+
export interface BaseApplicationCommandOptionsData extends CommonBaseApplicationCommandOptionsData {
|
|
4794
4810
|
required?: boolean;
|
|
4795
4811
|
}
|
|
4796
4812
|
|
|
@@ -4861,24 +4877,21 @@ export interface ApplicationCommandAttachmentOption extends BaseApplicationComma
|
|
|
4861
4877
|
type: ApplicationCommandOptionType.Attachment;
|
|
4862
4878
|
}
|
|
4863
4879
|
|
|
4864
|
-
export interface ApplicationCommandAutocompleteNumericOption
|
|
4865
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4880
|
+
export interface ApplicationCommandAutocompleteNumericOption extends BaseApplicationCommandOptionsData {
|
|
4866
4881
|
autocomplete: true;
|
|
4867
4882
|
maxValue?: number;
|
|
4868
4883
|
minValue?: number;
|
|
4869
4884
|
type: CommandOptionNumericResolvableType;
|
|
4870
4885
|
}
|
|
4871
4886
|
|
|
4872
|
-
export interface ApplicationCommandAutocompleteStringOption
|
|
4873
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4887
|
+
export interface ApplicationCommandAutocompleteStringOption extends BaseApplicationCommandOptionsData {
|
|
4874
4888
|
autocomplete: true;
|
|
4875
4889
|
maxLength?: number;
|
|
4876
4890
|
minLength?: number;
|
|
4877
4891
|
type: ApplicationCommandOptionType.String;
|
|
4878
4892
|
}
|
|
4879
4893
|
|
|
4880
|
-
export interface ApplicationCommandAutocompleteNumericOptionData
|
|
4881
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4894
|
+
export interface ApplicationCommandAutocompleteNumericOptionData extends BaseApplicationCommandOptionsData {
|
|
4882
4895
|
autocomplete: true;
|
|
4883
4896
|
maxValue?: number;
|
|
4884
4897
|
max_value?: number;
|
|
@@ -4887,8 +4900,7 @@ export interface ApplicationCommandAutocompleteNumericOptionData
|
|
|
4887
4900
|
type: CommandOptionNumericResolvableType;
|
|
4888
4901
|
}
|
|
4889
4902
|
|
|
4890
|
-
export interface ApplicationCommandAutocompleteStringOptionData
|
|
4891
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4903
|
+
export interface ApplicationCommandAutocompleteStringOptionData extends BaseApplicationCommandOptionsData {
|
|
4892
4904
|
autocomplete: true;
|
|
4893
4905
|
maxLength?: number;
|
|
4894
4906
|
max_length?: number;
|
|
@@ -4898,14 +4910,14 @@ export interface ApplicationCommandAutocompleteStringOptionData
|
|
|
4898
4910
|
}
|
|
4899
4911
|
|
|
4900
4912
|
export interface ApplicationCommandChoicesData<Type extends number | string = number | string>
|
|
4901
|
-
extends
|
|
4913
|
+
extends BaseApplicationCommandOptionsData {
|
|
4902
4914
|
autocomplete?: false;
|
|
4903
4915
|
choices?: readonly ApplicationCommandOptionChoiceData<Type>[];
|
|
4904
4916
|
type: CommandOptionChoiceResolvableType;
|
|
4905
4917
|
}
|
|
4906
4918
|
|
|
4907
4919
|
export interface ApplicationCommandChoicesOption<Type extends number | string = number | string>
|
|
4908
|
-
extends
|
|
4920
|
+
extends BaseApplicationCommandOptionsData {
|
|
4909
4921
|
autocomplete?: false;
|
|
4910
4922
|
choices?: readonly ApplicationCommandOptionChoiceData<Type>[];
|
|
4911
4923
|
type: CommandOptionChoiceResolvableType;
|
|
@@ -4947,17 +4959,17 @@ export interface ApplicationCommandBooleanOption extends BaseApplicationCommandO
|
|
|
4947
4959
|
type: ApplicationCommandOptionType.Boolean;
|
|
4948
4960
|
}
|
|
4949
4961
|
|
|
4950
|
-
export interface ApplicationCommandSubGroupData extends
|
|
4962
|
+
export interface ApplicationCommandSubGroupData extends CommonBaseApplicationCommandOptionsData {
|
|
4951
4963
|
options: readonly ApplicationCommandSubCommandData[];
|
|
4952
4964
|
type: ApplicationCommandOptionType.SubcommandGroup;
|
|
4953
4965
|
}
|
|
4954
4966
|
|
|
4955
|
-
export interface ApplicationCommandSubGroup extends
|
|
4967
|
+
export interface ApplicationCommandSubGroup extends CommonBaseApplicationCommandOptionsData {
|
|
4956
4968
|
options?: readonly ApplicationCommandSubCommand[];
|
|
4957
4969
|
type: ApplicationCommandOptionType.SubcommandGroup;
|
|
4958
4970
|
}
|
|
4959
4971
|
|
|
4960
|
-
export interface ApplicationCommandSubCommandData extends
|
|
4972
|
+
export interface ApplicationCommandSubCommandData extends CommonBaseApplicationCommandOptionsData {
|
|
4961
4973
|
options?: readonly Exclude<
|
|
4962
4974
|
ApplicationCommandOptionData,
|
|
4963
4975
|
ApplicationCommandSubCommandData | ApplicationCommandSubGroupData
|
|
@@ -4965,7 +4977,7 @@ export interface ApplicationCommandSubCommandData extends Omit<BaseApplicationCo
|
|
|
4965
4977
|
type: ApplicationCommandOptionType.Subcommand;
|
|
4966
4978
|
}
|
|
4967
4979
|
|
|
4968
|
-
export interface ApplicationCommandSubCommand extends
|
|
4980
|
+
export interface ApplicationCommandSubCommand extends CommonBaseApplicationCommandOptionsData {
|
|
4969
4981
|
options?: readonly Exclude<ApplicationCommandOption, ApplicationCommandSubCommand | ApplicationCommandSubGroup>[];
|
|
4970
4982
|
type: ApplicationCommandOptionType.Subcommand;
|
|
4971
4983
|
}
|
|
@@ -5068,7 +5080,12 @@ export interface AutoModerationAction {
|
|
|
5068
5080
|
type: AutoModerationActionType;
|
|
5069
5081
|
}
|
|
5070
5082
|
|
|
5071
|
-
export interface
|
|
5083
|
+
export interface BaseAutoModerationActionMetadata {
|
|
5084
|
+
customMessage?: string | null;
|
|
5085
|
+
durationSeconds?: number | null;
|
|
5086
|
+
}
|
|
5087
|
+
|
|
5088
|
+
export interface AutoModerationActionMetadata extends BaseAutoModerationActionMetadata {
|
|
5072
5089
|
channelId: Snowflake | null;
|
|
5073
5090
|
customMessage: string | null;
|
|
5074
5091
|
durationSeconds: number | null;
|
|
@@ -5084,13 +5101,12 @@ export interface AutoModerationTriggerMetadata {
|
|
|
5084
5101
|
}
|
|
5085
5102
|
|
|
5086
5103
|
export interface AwaitMessageComponentOptions<Interaction extends CollectedMessageInteraction>
|
|
5087
|
-
extends
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'guild' | 'interactionType' | 'message'> {}
|
|
5104
|
+
extends CollectorOptions<[Interaction, Collection<Snowflake, Interaction>]> {
|
|
5105
|
+
componentType?: ComponentType;
|
|
5106
|
+
}
|
|
5091
5107
|
|
|
5092
|
-
export interface AwaitModalSubmitOptions
|
|
5093
|
-
extends
|
|
5108
|
+
export interface AwaitModalSubmitOptions
|
|
5109
|
+
extends CollectorOptions<[ModalSubmitInteraction, Collection<Snowflake, ModalSubmitInteraction>]> {
|
|
5094
5110
|
time: number;
|
|
5095
5111
|
}
|
|
5096
5112
|
|
|
@@ -5380,8 +5396,7 @@ export interface ClientFetchInviteOptions {
|
|
|
5380
5396
|
guildScheduledEventId?: Snowflake;
|
|
5381
5397
|
}
|
|
5382
5398
|
|
|
5383
|
-
export interface ClientOptions {
|
|
5384
|
-
allowedMentions?: MessageMentionOptions;
|
|
5399
|
+
export interface ClientOptions extends WebhookClientOptions {
|
|
5385
5400
|
closeTimeout?: number;
|
|
5386
5401
|
enforceNonce?: boolean;
|
|
5387
5402
|
failIfNotExists?: boolean;
|
|
@@ -5390,7 +5405,6 @@ export interface ClientOptions {
|
|
|
5390
5405
|
makeCache?: CacheFactory;
|
|
5391
5406
|
partials?: readonly Partials[];
|
|
5392
5407
|
presence?: PresenceData;
|
|
5393
|
-
rest?: Partial<RESTOptions>;
|
|
5394
5408
|
sweepers?: SweeperOptions;
|
|
5395
5409
|
waitGuildTimeout?: number;
|
|
5396
5410
|
ws?: Partial<WebSocketManagerOptions>;
|
|
@@ -5455,8 +5469,9 @@ export interface CommandInteractionResolvedData<Cached extends CacheType = Cache
|
|
|
5455
5469
|
users?: ReadonlyCollection<Snowflake, User>;
|
|
5456
5470
|
}
|
|
5457
5471
|
|
|
5458
|
-
export interface AutocompleteFocusedOption
|
|
5472
|
+
export interface AutocompleteFocusedOption {
|
|
5459
5473
|
focused: true;
|
|
5474
|
+
name: string;
|
|
5460
5475
|
type:
|
|
5461
5476
|
| ApplicationCommandOptionType.Integer
|
|
5462
5477
|
| ApplicationCommandOptionType.Number
|
|
@@ -5652,11 +5667,8 @@ export type EmojiIdentifierResolvable =
|
|
|
5652
5667
|
|
|
5653
5668
|
export type EmojiResolvable = ApplicationEmoji | GuildEmoji | ReactionEmoji | Snowflake;
|
|
5654
5669
|
|
|
5655
|
-
export interface FetchApplicationCommandOptions extends
|
|
5670
|
+
export interface FetchApplicationCommandOptions extends FetchGuildApplicationCommandFetchOptions {
|
|
5656
5671
|
guildId?: Snowflake;
|
|
5657
|
-
id?: Snowflake;
|
|
5658
|
-
locale?: Locale;
|
|
5659
|
-
withLocalizations?: boolean;
|
|
5660
5672
|
}
|
|
5661
5673
|
|
|
5662
5674
|
export interface FetchArchivedThreadOptions {
|
|
@@ -5955,28 +5967,32 @@ export type GuildBanResolvable = GuildBan | UserResolvable;
|
|
|
5955
5967
|
|
|
5956
5968
|
export type GuildChannelResolvable = GuildBasedChannel | Snowflake;
|
|
5957
5969
|
|
|
5958
|
-
export interface AutoModerationRuleCreateOptions {
|
|
5970
|
+
export interface AutoModerationRuleCreateOptions extends AutoModerationRuleEditOptions {
|
|
5959
5971
|
actions: readonly AutoModerationActionOptions[];
|
|
5960
|
-
enabled?: boolean;
|
|
5961
5972
|
eventType: AutoModerationRuleEventType;
|
|
5973
|
+
name: string;
|
|
5974
|
+
triggerType: AutoModerationRuleTriggerType;
|
|
5975
|
+
}
|
|
5976
|
+
|
|
5977
|
+
export interface AutoModerationRuleEditOptions {
|
|
5978
|
+
actions?: readonly AutoModerationActionOptions[];
|
|
5979
|
+
enabled?: boolean;
|
|
5980
|
+
eventType?: AutoModerationRuleEventType;
|
|
5962
5981
|
exemptChannels?: ReadonlyCollection<Snowflake, GuildBasedChannel> | readonly GuildChannelResolvable[];
|
|
5963
5982
|
exemptRoles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[];
|
|
5964
|
-
name
|
|
5983
|
+
name?: string;
|
|
5965
5984
|
reason?: string;
|
|
5966
5985
|
triggerMetadata?: AutoModerationTriggerMetadataOptions;
|
|
5967
|
-
triggerType: AutoModerationRuleTriggerType;
|
|
5968
5986
|
}
|
|
5969
5987
|
|
|
5970
|
-
export interface
|
|
5971
|
-
|
|
5972
|
-
export interface AutoModerationTriggerMetadataOptions extends Partial<AutoModerationTriggerMetadata> {}
|
|
5988
|
+
export interface AutoModerationTriggerMetadataOptions extends AutoModerationTriggerMetadata {}
|
|
5973
5989
|
|
|
5974
5990
|
export interface AutoModerationActionOptions {
|
|
5975
5991
|
metadata?: AutoModerationActionMetadataOptions;
|
|
5976
5992
|
type: AutoModerationActionType;
|
|
5977
5993
|
}
|
|
5978
5994
|
|
|
5979
|
-
export interface AutoModerationActionMetadataOptions extends
|
|
5995
|
+
export interface AutoModerationActionMetadataOptions extends BaseAutoModerationActionMetadata {
|
|
5980
5996
|
channel?: GuildTextChannelResolvable | ThreadChannel;
|
|
5981
5997
|
}
|
|
5982
5998
|
|
|
@@ -6317,7 +6333,7 @@ export interface InteractionDeferUpdateOptions {
|
|
|
6317
6333
|
withResponse?: boolean;
|
|
6318
6334
|
}
|
|
6319
6335
|
|
|
6320
|
-
export interface InteractionReplyOptions extends
|
|
6336
|
+
export interface InteractionReplyOptions extends BaseMessageOptions, MessageOptionsPoll {
|
|
6321
6337
|
flags?:
|
|
6322
6338
|
| BitFieldResolvable<
|
|
6323
6339
|
Extract<MessageFlagsString, 'Ephemeral' | 'IsComponentsV2' | 'SuppressEmbeds' | 'SuppressNotifications'>,
|
|
@@ -6416,10 +6432,18 @@ export type CollectedMessageInteraction<Cached extends CacheType = CacheType> =
|
|
|
6416
6432
|
>;
|
|
6417
6433
|
|
|
6418
6434
|
export interface MessageComponentCollectorOptions<Interaction extends CollectedMessageInteraction>
|
|
6419
|
-
extends
|
|
6435
|
+
extends AwaitMessageComponentOptions<Interaction> {
|
|
6436
|
+
max?: number;
|
|
6437
|
+
maxComponents?: number;
|
|
6438
|
+
maxUsers?: number;
|
|
6439
|
+
}
|
|
6420
6440
|
|
|
6421
|
-
export interface MessageChannelComponentCollectorOptions<
|
|
6422
|
-
|
|
6441
|
+
export interface MessageChannelComponentCollectorOptions<
|
|
6442
|
+
Interaction extends CollectedMessageInteraction,
|
|
6443
|
+
Cached extends CacheType = CacheType,
|
|
6444
|
+
> extends MessageComponentCollectorOptions<Interaction> {
|
|
6445
|
+
message?: CacheTypeReducer<Cached, Message, APIMessage>;
|
|
6446
|
+
}
|
|
6423
6447
|
|
|
6424
6448
|
export interface MessageInteractionMetadata {
|
|
6425
6449
|
authorizingIntegrationOwners: APIAuthorizingIntegrationOwnersMap;
|
|
@@ -6488,30 +6512,45 @@ export interface BaseMessageOptions {
|
|
|
6488
6512
|
)[];
|
|
6489
6513
|
}
|
|
6490
6514
|
|
|
6491
|
-
export interface
|
|
6515
|
+
export interface MessageOptionsPoll {
|
|
6492
6516
|
poll?: JSONEncodable<RESTAPIPoll> | PollData;
|
|
6493
6517
|
}
|
|
6494
6518
|
|
|
6495
|
-
export interface
|
|
6496
|
-
enforceNonce?: boolean;
|
|
6519
|
+
export interface MessageOptionsFlags {
|
|
6497
6520
|
flags?:
|
|
6498
6521
|
| BitFieldResolvable<
|
|
6499
6522
|
Extract<MessageFlagsString, 'IsComponentsV2' | 'SuppressEmbeds' | 'SuppressNotifications'>,
|
|
6500
6523
|
MessageFlags.IsComponentsV2 | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
|
|
6501
6524
|
>
|
|
6502
6525
|
| undefined;
|
|
6503
|
-
|
|
6504
|
-
|
|
6526
|
+
}
|
|
6527
|
+
|
|
6528
|
+
export interface MessageOptionsTTS {
|
|
6505
6529
|
tts?: boolean;
|
|
6506
6530
|
}
|
|
6507
6531
|
|
|
6532
|
+
export interface MessageOptionsStickers {
|
|
6533
|
+
stickers?: readonly StickerResolvable[];
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6536
|
+
export interface BaseMessageCreateOptions
|
|
6537
|
+
extends BaseMessageOptions,
|
|
6538
|
+
MessageOptionsPoll,
|
|
6539
|
+
MessageOptionsFlags,
|
|
6540
|
+
MessageOptionsTTS,
|
|
6541
|
+
MessageOptionsStickers {
|
|
6542
|
+
enforceNonce?: boolean;
|
|
6543
|
+
nonce?: number | string;
|
|
6544
|
+
}
|
|
6545
|
+
|
|
6508
6546
|
export interface MessageCreateOptions extends BaseMessageCreateOptions {
|
|
6509
6547
|
messageReference?: MessageReferenceOptions;
|
|
6510
6548
|
}
|
|
6511
6549
|
|
|
6512
6550
|
export interface GuildForumThreadMessageCreateOptions
|
|
6513
6551
|
extends BaseMessageOptions,
|
|
6514
|
-
|
|
6552
|
+
MessageOptionsFlags,
|
|
6553
|
+
MessageOptionsStickers {}
|
|
6515
6554
|
|
|
6516
6555
|
export interface MessageEditAttachmentData {
|
|
6517
6556
|
id: Snowflake;
|
|
@@ -7031,7 +7070,10 @@ export interface WebhookClientDataURL {
|
|
|
7031
7070
|
url: string;
|
|
7032
7071
|
}
|
|
7033
7072
|
|
|
7034
|
-
export interface WebhookClientOptions
|
|
7073
|
+
export interface WebhookClientOptions {
|
|
7074
|
+
allowedMentions?: MessageMentionOptions;
|
|
7075
|
+
rest?: Partial<RESTOptions>;
|
|
7076
|
+
}
|
|
7035
7077
|
|
|
7036
7078
|
export interface WebhookDeleteOptions {
|
|
7037
7079
|
reason?: string;
|
|
@@ -7050,9 +7092,7 @@ export interface WebhookMessageEditOptions extends MessageEditOptions {
|
|
|
7050
7092
|
withComponents?: boolean;
|
|
7051
7093
|
}
|
|
7052
7094
|
|
|
7053
|
-
export interface InteractionEditReplyOptions
|
|
7054
|
-
extends WebhookMessageEditOptions,
|
|
7055
|
-
Pick<BaseMessageOptionsWithPoll, 'poll'> {
|
|
7095
|
+
export interface InteractionEditReplyOptions extends WebhookMessageEditOptions, MessageOptionsPoll {
|
|
7056
7096
|
message?: MessageResolvable | '@original';
|
|
7057
7097
|
}
|
|
7058
7098
|
|
|
@@ -7060,7 +7100,11 @@ export interface WebhookFetchMessageOptions {
|
|
|
7060
7100
|
threadId?: Snowflake;
|
|
7061
7101
|
}
|
|
7062
7102
|
|
|
7063
|
-
export interface WebhookMessageCreateOptions
|
|
7103
|
+
export interface WebhookMessageCreateOptions
|
|
7104
|
+
extends BaseMessageOptions,
|
|
7105
|
+
MessageOptionsPoll,
|
|
7106
|
+
MessageOptionsFlags,
|
|
7107
|
+
MessageOptionsTTS {
|
|
7064
7108
|
appliedTags?: readonly Snowflake[];
|
|
7065
7109
|
avatarURL?: string;
|
|
7066
7110
|
threadId?: Snowflake;
|
package/typings/index.d.ts
CHANGED
|
@@ -564,9 +564,7 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
|
|
|
564
564
|
| ModalComponentData,
|
|
565
565
|
options?: ShowModalOptions,
|
|
566
566
|
): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
|
|
567
|
-
public awaitModalSubmit(
|
|
568
|
-
options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
|
|
569
|
-
): Promise<ModalSubmitInteraction<Cached>>;
|
|
567
|
+
public awaitModalSubmit(options: AwaitModalSubmitOptions): Promise<ModalSubmitInteraction<Cached>>;
|
|
570
568
|
private transformOption(
|
|
571
569
|
option: APIApplicationCommandOption,
|
|
572
570
|
resolved: Extract<APIApplicationCommandInteractionData, { resolved: any }>['resolved'],
|
|
@@ -603,7 +601,14 @@ export class BaseGuildEmoji extends Emoji {
|
|
|
603
601
|
public requiresColons: boolean | null;
|
|
604
602
|
}
|
|
605
603
|
|
|
606
|
-
export interface BaseGuildTextChannel
|
|
604
|
+
export interface BaseGuildTextChannel
|
|
605
|
+
extends TextBasedChannelFields<true>,
|
|
606
|
+
PinnableChannelFields,
|
|
607
|
+
WebhookChannelFields,
|
|
608
|
+
BulkDeleteMethod,
|
|
609
|
+
SetRateLimitPerUserMethod,
|
|
610
|
+
MessageChannelFields,
|
|
611
|
+
SendMethod<true> {}
|
|
607
612
|
export class BaseGuildTextChannel extends GuildChannel {
|
|
608
613
|
protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean);
|
|
609
614
|
public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
|
|
@@ -623,7 +628,13 @@ export class BaseGuildTextChannel extends GuildChannel {
|
|
|
623
628
|
public setType(type: ChannelType.GuildAnnouncement, reason?: string): Promise<AnnouncementChannel>;
|
|
624
629
|
}
|
|
625
630
|
|
|
626
|
-
export interface BaseGuildVoiceChannel
|
|
631
|
+
export interface BaseGuildVoiceChannel
|
|
632
|
+
extends TextBasedChannelFields<true>,
|
|
633
|
+
WebhookChannelFields,
|
|
634
|
+
BulkDeleteMethod,
|
|
635
|
+
SetRateLimitPerUserMethod,
|
|
636
|
+
MessageChannelFields,
|
|
637
|
+
SendMethod<true> {}
|
|
627
638
|
export class BaseGuildVoiceChannel extends GuildChannel {
|
|
628
639
|
public constructor(guild: Guild, data?: RawGuildChannelData);
|
|
629
640
|
public bitrate: number;
|
|
@@ -774,12 +785,20 @@ export interface IconData {
|
|
|
774
785
|
proxyIconURL?: string;
|
|
775
786
|
}
|
|
776
787
|
|
|
777
|
-
export interface EmbedAuthorData extends
|
|
788
|
+
export interface EmbedAuthorData extends IconData {
|
|
789
|
+
name: string;
|
|
790
|
+
url?: string;
|
|
791
|
+
}
|
|
778
792
|
|
|
779
|
-
export interface EmbedFooterData extends
|
|
793
|
+
export interface EmbedFooterData extends IconData {
|
|
794
|
+
text: string;
|
|
795
|
+
}
|
|
780
796
|
|
|
781
|
-
export interface EmbedAssetData
|
|
797
|
+
export interface EmbedAssetData {
|
|
798
|
+
height?: number;
|
|
782
799
|
proxyURL?: string;
|
|
800
|
+
url: string;
|
|
801
|
+
width?: number;
|
|
783
802
|
}
|
|
784
803
|
|
|
785
804
|
export class Embed {
|
|
@@ -897,7 +916,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient<ClientEv
|
|
|
897
916
|
public channels: ChannelManager;
|
|
898
917
|
public guilds: GuildManager;
|
|
899
918
|
public lastPingTimestamps: ReadonlyCollection<number, number>;
|
|
900
|
-
public options:
|
|
919
|
+
public options: ClientOptions & { intents: IntentsBitField };
|
|
901
920
|
public get ping(): number | null;
|
|
902
921
|
public get readyAt(): If<Ready, Date>;
|
|
903
922
|
public readyTimestamp: If<Ready, number>;
|
|
@@ -1245,10 +1264,10 @@ export class PrimaryEntryPointCommandInteraction<
|
|
|
1245
1264
|
}
|
|
1246
1265
|
|
|
1247
1266
|
export interface DMChannel
|
|
1248
|
-
extends
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1267
|
+
extends TextBasedChannelFields<false, true>,
|
|
1268
|
+
PinnableChannelFields,
|
|
1269
|
+
MessageChannelFields,
|
|
1270
|
+
SendMethod<false> {}
|
|
1252
1271
|
export class DMChannel extends BaseChannel {
|
|
1253
1272
|
private constructor(client: Client<true>, data?: RawDMChannelData);
|
|
1254
1273
|
public flags: Readonly<ChannelFlagsBitField>;
|
|
@@ -1592,7 +1611,7 @@ export class GuildMemberFlagsBitField extends BitField<GuildMemberFlagsString> {
|
|
|
1592
1611
|
public static resolve(bit?: BitFieldResolvable<GuildMemberFlagsString, GuildMemberFlags>): number;
|
|
1593
1612
|
}
|
|
1594
1613
|
|
|
1595
|
-
export interface GuildMember extends
|
|
1614
|
+
export interface GuildMember extends SendMethod<false> {}
|
|
1596
1615
|
export class GuildMember extends Base {
|
|
1597
1616
|
private constructor(client: Client<true>, data: unknown, guild: Guild);
|
|
1598
1617
|
private readonly _roles: Snowflake[];
|
|
@@ -2095,10 +2114,7 @@ export interface MessageChannelCollectorOptionsParams<
|
|
|
2095
2114
|
export interface AwaitMessageCollectorOptionsParams<
|
|
2096
2115
|
ComponentType extends MessageComponentType,
|
|
2097
2116
|
Cached extends boolean = boolean,
|
|
2098
|
-
> extends
|
|
2099
|
-
InteractionCollectorOptions<MappedInteractionTypes<Cached>[ComponentType]>,
|
|
2100
|
-
keyof AwaitMessageComponentOptions<any>
|
|
2101
|
-
> {
|
|
2117
|
+
> extends AwaitMessageComponentOptions<MappedInteractionTypes<Cached>[ComponentType]> {
|
|
2102
2118
|
componentType?: ComponentType;
|
|
2103
2119
|
}
|
|
2104
2120
|
|
|
@@ -2347,9 +2363,7 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
|
|
|
2347
2363
|
| ModalComponentData,
|
|
2348
2364
|
options?: ShowModalOptions,
|
|
2349
2365
|
): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
|
|
2350
|
-
public awaitModalSubmit(
|
|
2351
|
-
options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
|
|
2352
|
-
): Promise<ModalSubmitInteraction<Cached>>;
|
|
2366
|
+
public awaitModalSubmit(options: AwaitModalSubmitOptions): Promise<ModalSubmitInteraction<Cached>>;
|
|
2353
2367
|
}
|
|
2354
2368
|
|
|
2355
2369
|
export class MessageContextMenuCommandInteraction<
|
|
@@ -2601,19 +2615,7 @@ export class OAuth2Guild extends BaseGuild {
|
|
|
2601
2615
|
public permissions: Readonly<PermissionsBitField>;
|
|
2602
2616
|
}
|
|
2603
2617
|
|
|
2604
|
-
export interface PartialGroupDMChannel
|
|
2605
|
-
extends Omit<
|
|
2606
|
-
TextBasedChannelFields<false, false>,
|
|
2607
|
-
| 'awaitMessages'
|
|
2608
|
-
| 'bulkDelete'
|
|
2609
|
-
| 'createMessageCollector'
|
|
2610
|
-
| 'createWebhook'
|
|
2611
|
-
| 'fetchWebhooks'
|
|
2612
|
-
| 'send'
|
|
2613
|
-
| 'sendTyping'
|
|
2614
|
-
| 'setNSFW'
|
|
2615
|
-
| 'setRateLimitPerUser'
|
|
2616
|
-
> {}
|
|
2618
|
+
export interface PartialGroupDMChannel extends TextBasedChannelFields<false, false>, PinnableChannelFields {}
|
|
2617
2619
|
export class PartialGroupDMChannel extends BaseChannel {
|
|
2618
2620
|
private constructor(client: Client<true>, data: RawPartialGroupDMChannelData);
|
|
2619
2621
|
public type: ChannelType.GroupDM;
|
|
@@ -2648,20 +2650,7 @@ export interface DefaultReactionEmoji {
|
|
|
2648
2650
|
name: string | null;
|
|
2649
2651
|
}
|
|
2650
2652
|
|
|
2651
|
-
export interface ThreadOnlyChannel
|
|
2652
|
-
extends Omit<
|
|
2653
|
-
TextBasedChannelFields,
|
|
2654
|
-
| 'awaitMessageComponent'
|
|
2655
|
-
| 'awaitMessages'
|
|
2656
|
-
| 'bulkDelete'
|
|
2657
|
-
| 'createMessageCollector'
|
|
2658
|
-
| 'createMessageComponentCollector'
|
|
2659
|
-
| 'lastMessage'
|
|
2660
|
-
| 'lastPinAt'
|
|
2661
|
-
| 'messages'
|
|
2662
|
-
| 'send'
|
|
2663
|
-
| 'sendTyping'
|
|
2664
|
-
> {}
|
|
2653
|
+
export interface ThreadOnlyChannel extends WebhookChannelFields, SetRateLimitPerUserMethod {}
|
|
2665
2654
|
export abstract class ThreadOnlyChannel extends GuildChannel {
|
|
2666
2655
|
public type: ChannelType.GuildForum | ChannelType.GuildMedia;
|
|
2667
2656
|
public threads: GuildForumThreadManager;
|
|
@@ -3392,7 +3381,12 @@ export interface PrivateThreadChannel extends ThreadChannel<false> {
|
|
|
3392
3381
|
}
|
|
3393
3382
|
|
|
3394
3383
|
export interface ThreadChannel<ThreadOnly extends boolean = boolean>
|
|
3395
|
-
extends
|
|
3384
|
+
extends TextBasedChannelFields<true>,
|
|
3385
|
+
PinnableChannelFields,
|
|
3386
|
+
BulkDeleteMethod,
|
|
3387
|
+
SetRateLimitPerUserMethod,
|
|
3388
|
+
MessageChannelFields,
|
|
3389
|
+
SendMethod<true> {}
|
|
3396
3390
|
export class ThreadChannel<ThreadOnly extends boolean = boolean> extends BaseChannel {
|
|
3397
3391
|
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client<true>);
|
|
3398
3392
|
public archived: boolean | null;
|
|
@@ -3513,7 +3507,7 @@ export class UnfurledMediaItem {
|
|
|
3513
3507
|
public get url(): string;
|
|
3514
3508
|
}
|
|
3515
3509
|
|
|
3516
|
-
export interface User extends
|
|
3510
|
+
export interface User extends SendMethod<false> {}
|
|
3517
3511
|
export class User extends Base {
|
|
3518
3512
|
protected constructor(client: Client<true>, data: unknown);
|
|
3519
3513
|
private _equals(user: APIUser): boolean;
|
|
@@ -4036,7 +4030,7 @@ export class ApplicationCommandManager<
|
|
|
4036
4030
|
guildId: Snowflake,
|
|
4037
4031
|
): Promise<ApplicationCommand>;
|
|
4038
4032
|
public fetch(
|
|
4039
|
-
options: Snowflake | (
|
|
4033
|
+
options: Snowflake | (FetchGuildApplicationCommandFetchOptions & { id: Snowflake }),
|
|
4040
4034
|
): Promise<ApplicationCommandScope>;
|
|
4041
4035
|
public fetch(
|
|
4042
4036
|
options: FetchApplicationCommandOptions & { guildId: Snowflake; id: Snowflake },
|
|
@@ -4199,7 +4193,11 @@ export class SubscriptionManager extends CachedManager<Snowflake, Subscription,
|
|
|
4199
4193
|
public fetch(options: FetchSubscriptionsOptions): Promise<Collection<Snowflake, Subscription>>;
|
|
4200
4194
|
}
|
|
4201
4195
|
|
|
4202
|
-
export interface FetchGuildApplicationCommandFetchOptions extends
|
|
4196
|
+
export interface FetchGuildApplicationCommandFetchOptions extends BaseFetchOptions {
|
|
4197
|
+
id?: Snowflake;
|
|
4198
|
+
locale?: Locale;
|
|
4199
|
+
withLocalizations?: boolean;
|
|
4200
|
+
}
|
|
4203
4201
|
|
|
4204
4202
|
export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> {
|
|
4205
4203
|
private constructor(guild: Guild, iterable?: Iterable<APIApplicationCommand>);
|
|
@@ -4416,7 +4414,9 @@ export interface FetchGuildSoundboardSoundOptions extends BaseFetchOptions {
|
|
|
4416
4414
|
soundboardSound: SoundboardSoundResolvable;
|
|
4417
4415
|
}
|
|
4418
4416
|
|
|
4419
|
-
export interface FetchGuildSoundboardSoundsOptions
|
|
4417
|
+
export interface FetchGuildSoundboardSoundsOptions {
|
|
4418
|
+
cache?: boolean;
|
|
4419
|
+
}
|
|
4420
4420
|
|
|
4421
4421
|
export class GuildSoundboardSoundManager extends CachedManager<Snowflake, SoundboardSound, SoundboardSoundResolvable> {
|
|
4422
4422
|
private constructor(guild: Guild, iterable?: Iterable<APISoundboardSound>);
|
|
@@ -4658,34 +4658,48 @@ export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, type
|
|
|
4658
4658
|
|
|
4659
4659
|
export type Constructable<Entity> = abstract new (...args: any[]) => Entity;
|
|
4660
4660
|
|
|
4661
|
-
export interface
|
|
4661
|
+
export interface SendMethod<InGuild extends boolean = boolean> {
|
|
4662
4662
|
send(options: MessageCreateOptions | MessagePayload | string): Promise<Message<InGuild>>;
|
|
4663
4663
|
}
|
|
4664
4664
|
|
|
4665
|
-
export interface
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4665
|
+
export interface PinnableChannelFields {
|
|
4666
|
+
get lastPinAt(): Date | null;
|
|
4667
|
+
lastPinTimestamp: number | null;
|
|
4668
|
+
}
|
|
4669
|
+
|
|
4670
|
+
export interface BulkDeleteMethod {
|
|
4671
4671
|
bulkDelete(
|
|
4672
4672
|
messages: Collection<Snowflake, Message> | number | readonly MessageResolvable[],
|
|
4673
4673
|
filterOld?: boolean,
|
|
4674
4674
|
): Promise<Snowflake[]>;
|
|
4675
|
+
}
|
|
4676
|
+
|
|
4677
|
+
export interface SetRateLimitPerUserMethod {
|
|
4678
|
+
setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4681
|
+
export interface WebhookChannelFields {
|
|
4682
|
+
createWebhook(options: ChannelWebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>;
|
|
4683
|
+
fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>;
|
|
4684
|
+
setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
|
|
4685
|
+
}
|
|
4686
|
+
|
|
4687
|
+
export interface MessageChannelFields {
|
|
4688
|
+
awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>;
|
|
4675
4689
|
createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
|
|
4690
|
+
sendTyping(): Promise<void>;
|
|
4691
|
+
}
|
|
4692
|
+
|
|
4693
|
+
export interface TextBasedChannelFields<InGuild extends boolean = boolean, InDM extends boolean = boolean> {
|
|
4694
|
+
awaitMessageComponent<ComponentType extends MessageComponentType>(
|
|
4695
|
+
options?: AwaitMessageCollectorOptionsParams<ComponentType, true>,
|
|
4696
|
+
): Promise<MappedInteractionTypes[ComponentType]>;
|
|
4676
4697
|
createMessageComponentCollector<ComponentType extends MessageComponentType>(
|
|
4677
4698
|
options?: MessageChannelCollectorOptionsParams<ComponentType, true>,
|
|
4678
4699
|
): InteractionCollector<MappedInteractionTypes[ComponentType]>;
|
|
4679
|
-
createWebhook(options: ChannelWebhookCreateOptions): Promise<Webhook<WebhookType.Incoming>>;
|
|
4680
|
-
fetchWebhooks(): Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>;
|
|
4681
4700
|
get lastMessage(): Message | null;
|
|
4682
4701
|
lastMessageId: Snowflake | null;
|
|
4683
|
-
get lastPinAt(): Date | null;
|
|
4684
|
-
lastPinTimestamp: number | null;
|
|
4685
4702
|
messages: If<InGuild, GuildMessageManager, If<InDM, DMMessageManager, PartialGroupDMMessageManager>>;
|
|
4686
|
-
sendTyping(): Promise<void>;
|
|
4687
|
-
setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
|
|
4688
|
-
setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
|
|
4689
4703
|
}
|
|
4690
4704
|
|
|
4691
4705
|
export interface PartialWebhookFields {
|
|
@@ -4714,16 +4728,17 @@ export interface WebhookFields extends PartialWebhookFields {
|
|
|
4714
4728
|
|
|
4715
4729
|
// #region Typedefs
|
|
4716
4730
|
|
|
4717
|
-
export interface ActivitiesOptions
|
|
4718
|
-
|
|
4719
|
-
export interface ActivityOptions {
|
|
4731
|
+
export interface ActivitiesOptions {
|
|
4720
4732
|
name: string;
|
|
4721
|
-
shardId?: number | readonly number[];
|
|
4722
4733
|
state?: string;
|
|
4723
4734
|
type?: ActivityType;
|
|
4724
4735
|
url?: string;
|
|
4725
4736
|
}
|
|
4726
4737
|
|
|
4738
|
+
export interface ActivityOptions extends ActivitiesOptions {
|
|
4739
|
+
shardId?: number | readonly number[];
|
|
4740
|
+
}
|
|
4741
|
+
|
|
4727
4742
|
export interface AddGuildMemberOptions {
|
|
4728
4743
|
accessToken: string;
|
|
4729
4744
|
deaf?: boolean;
|
|
@@ -4785,12 +4800,13 @@ export type CommandOptionNonChoiceResolvableType = Exclude<
|
|
|
4785
4800
|
CommandOptionChannelResolvableType | CommandOptionChoiceResolvableType | CommandOptionSubOptionResolvableType
|
|
4786
4801
|
>;
|
|
4787
4802
|
|
|
4788
|
-
export interface
|
|
4789
|
-
autocomplete?: never;
|
|
4803
|
+
export interface CommonBaseApplicationCommandOptionsData {
|
|
4790
4804
|
description: string;
|
|
4791
4805
|
descriptionLocalizations?: LocalizationMap;
|
|
4792
4806
|
name: string;
|
|
4793
4807
|
nameLocalizations?: LocalizationMap;
|
|
4808
|
+
}
|
|
4809
|
+
export interface BaseApplicationCommandOptionsData extends CommonBaseApplicationCommandOptionsData {
|
|
4794
4810
|
required?: boolean;
|
|
4795
4811
|
}
|
|
4796
4812
|
|
|
@@ -4861,24 +4877,21 @@ export interface ApplicationCommandAttachmentOption extends BaseApplicationComma
|
|
|
4861
4877
|
type: ApplicationCommandOptionType.Attachment;
|
|
4862
4878
|
}
|
|
4863
4879
|
|
|
4864
|
-
export interface ApplicationCommandAutocompleteNumericOption
|
|
4865
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4880
|
+
export interface ApplicationCommandAutocompleteNumericOption extends BaseApplicationCommandOptionsData {
|
|
4866
4881
|
autocomplete: true;
|
|
4867
4882
|
maxValue?: number;
|
|
4868
4883
|
minValue?: number;
|
|
4869
4884
|
type: CommandOptionNumericResolvableType;
|
|
4870
4885
|
}
|
|
4871
4886
|
|
|
4872
|
-
export interface ApplicationCommandAutocompleteStringOption
|
|
4873
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4887
|
+
export interface ApplicationCommandAutocompleteStringOption extends BaseApplicationCommandOptionsData {
|
|
4874
4888
|
autocomplete: true;
|
|
4875
4889
|
maxLength?: number;
|
|
4876
4890
|
minLength?: number;
|
|
4877
4891
|
type: ApplicationCommandOptionType.String;
|
|
4878
4892
|
}
|
|
4879
4893
|
|
|
4880
|
-
export interface ApplicationCommandAutocompleteNumericOptionData
|
|
4881
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4894
|
+
export interface ApplicationCommandAutocompleteNumericOptionData extends BaseApplicationCommandOptionsData {
|
|
4882
4895
|
autocomplete: true;
|
|
4883
4896
|
maxValue?: number;
|
|
4884
4897
|
max_value?: number;
|
|
@@ -4887,8 +4900,7 @@ export interface ApplicationCommandAutocompleteNumericOptionData
|
|
|
4887
4900
|
type: CommandOptionNumericResolvableType;
|
|
4888
4901
|
}
|
|
4889
4902
|
|
|
4890
|
-
export interface ApplicationCommandAutocompleteStringOptionData
|
|
4891
|
-
extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
|
4903
|
+
export interface ApplicationCommandAutocompleteStringOptionData extends BaseApplicationCommandOptionsData {
|
|
4892
4904
|
autocomplete: true;
|
|
4893
4905
|
maxLength?: number;
|
|
4894
4906
|
max_length?: number;
|
|
@@ -4898,14 +4910,14 @@ export interface ApplicationCommandAutocompleteStringOptionData
|
|
|
4898
4910
|
}
|
|
4899
4911
|
|
|
4900
4912
|
export interface ApplicationCommandChoicesData<Type extends number | string = number | string>
|
|
4901
|
-
extends
|
|
4913
|
+
extends BaseApplicationCommandOptionsData {
|
|
4902
4914
|
autocomplete?: false;
|
|
4903
4915
|
choices?: readonly ApplicationCommandOptionChoiceData<Type>[];
|
|
4904
4916
|
type: CommandOptionChoiceResolvableType;
|
|
4905
4917
|
}
|
|
4906
4918
|
|
|
4907
4919
|
export interface ApplicationCommandChoicesOption<Type extends number | string = number | string>
|
|
4908
|
-
extends
|
|
4920
|
+
extends BaseApplicationCommandOptionsData {
|
|
4909
4921
|
autocomplete?: false;
|
|
4910
4922
|
choices?: readonly ApplicationCommandOptionChoiceData<Type>[];
|
|
4911
4923
|
type: CommandOptionChoiceResolvableType;
|
|
@@ -4947,17 +4959,17 @@ export interface ApplicationCommandBooleanOption extends BaseApplicationCommandO
|
|
|
4947
4959
|
type: ApplicationCommandOptionType.Boolean;
|
|
4948
4960
|
}
|
|
4949
4961
|
|
|
4950
|
-
export interface ApplicationCommandSubGroupData extends
|
|
4962
|
+
export interface ApplicationCommandSubGroupData extends CommonBaseApplicationCommandOptionsData {
|
|
4951
4963
|
options: readonly ApplicationCommandSubCommandData[];
|
|
4952
4964
|
type: ApplicationCommandOptionType.SubcommandGroup;
|
|
4953
4965
|
}
|
|
4954
4966
|
|
|
4955
|
-
export interface ApplicationCommandSubGroup extends
|
|
4967
|
+
export interface ApplicationCommandSubGroup extends CommonBaseApplicationCommandOptionsData {
|
|
4956
4968
|
options?: readonly ApplicationCommandSubCommand[];
|
|
4957
4969
|
type: ApplicationCommandOptionType.SubcommandGroup;
|
|
4958
4970
|
}
|
|
4959
4971
|
|
|
4960
|
-
export interface ApplicationCommandSubCommandData extends
|
|
4972
|
+
export interface ApplicationCommandSubCommandData extends CommonBaseApplicationCommandOptionsData {
|
|
4961
4973
|
options?: readonly Exclude<
|
|
4962
4974
|
ApplicationCommandOptionData,
|
|
4963
4975
|
ApplicationCommandSubCommandData | ApplicationCommandSubGroupData
|
|
@@ -4965,7 +4977,7 @@ export interface ApplicationCommandSubCommandData extends Omit<BaseApplicationCo
|
|
|
4965
4977
|
type: ApplicationCommandOptionType.Subcommand;
|
|
4966
4978
|
}
|
|
4967
4979
|
|
|
4968
|
-
export interface ApplicationCommandSubCommand extends
|
|
4980
|
+
export interface ApplicationCommandSubCommand extends CommonBaseApplicationCommandOptionsData {
|
|
4969
4981
|
options?: readonly Exclude<ApplicationCommandOption, ApplicationCommandSubCommand | ApplicationCommandSubGroup>[];
|
|
4970
4982
|
type: ApplicationCommandOptionType.Subcommand;
|
|
4971
4983
|
}
|
|
@@ -5068,7 +5080,12 @@ export interface AutoModerationAction {
|
|
|
5068
5080
|
type: AutoModerationActionType;
|
|
5069
5081
|
}
|
|
5070
5082
|
|
|
5071
|
-
export interface
|
|
5083
|
+
export interface BaseAutoModerationActionMetadata {
|
|
5084
|
+
customMessage?: string | null;
|
|
5085
|
+
durationSeconds?: number | null;
|
|
5086
|
+
}
|
|
5087
|
+
|
|
5088
|
+
export interface AutoModerationActionMetadata extends BaseAutoModerationActionMetadata {
|
|
5072
5089
|
channelId: Snowflake | null;
|
|
5073
5090
|
customMessage: string | null;
|
|
5074
5091
|
durationSeconds: number | null;
|
|
@@ -5084,13 +5101,12 @@ export interface AutoModerationTriggerMetadata {
|
|
|
5084
5101
|
}
|
|
5085
5102
|
|
|
5086
5103
|
export interface AwaitMessageComponentOptions<Interaction extends CollectedMessageInteraction>
|
|
5087
|
-
extends
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
extends Omit<InteractionCollectorOptions<Interaction>, 'channel' | 'guild' | 'interactionType' | 'message'> {}
|
|
5104
|
+
extends CollectorOptions<[Interaction, Collection<Snowflake, Interaction>]> {
|
|
5105
|
+
componentType?: ComponentType;
|
|
5106
|
+
}
|
|
5091
5107
|
|
|
5092
|
-
export interface AwaitModalSubmitOptions
|
|
5093
|
-
extends
|
|
5108
|
+
export interface AwaitModalSubmitOptions
|
|
5109
|
+
extends CollectorOptions<[ModalSubmitInteraction, Collection<Snowflake, ModalSubmitInteraction>]> {
|
|
5094
5110
|
time: number;
|
|
5095
5111
|
}
|
|
5096
5112
|
|
|
@@ -5380,8 +5396,7 @@ export interface ClientFetchInviteOptions {
|
|
|
5380
5396
|
guildScheduledEventId?: Snowflake;
|
|
5381
5397
|
}
|
|
5382
5398
|
|
|
5383
|
-
export interface ClientOptions {
|
|
5384
|
-
allowedMentions?: MessageMentionOptions;
|
|
5399
|
+
export interface ClientOptions extends WebhookClientOptions {
|
|
5385
5400
|
closeTimeout?: number;
|
|
5386
5401
|
enforceNonce?: boolean;
|
|
5387
5402
|
failIfNotExists?: boolean;
|
|
@@ -5390,7 +5405,6 @@ export interface ClientOptions {
|
|
|
5390
5405
|
makeCache?: CacheFactory;
|
|
5391
5406
|
partials?: readonly Partials[];
|
|
5392
5407
|
presence?: PresenceData;
|
|
5393
|
-
rest?: Partial<RESTOptions>;
|
|
5394
5408
|
sweepers?: SweeperOptions;
|
|
5395
5409
|
waitGuildTimeout?: number;
|
|
5396
5410
|
ws?: Partial<WebSocketManagerOptions>;
|
|
@@ -5455,8 +5469,9 @@ export interface CommandInteractionResolvedData<Cached extends CacheType = Cache
|
|
|
5455
5469
|
users?: ReadonlyCollection<Snowflake, User>;
|
|
5456
5470
|
}
|
|
5457
5471
|
|
|
5458
|
-
export interface AutocompleteFocusedOption
|
|
5472
|
+
export interface AutocompleteFocusedOption {
|
|
5459
5473
|
focused: true;
|
|
5474
|
+
name: string;
|
|
5460
5475
|
type:
|
|
5461
5476
|
| ApplicationCommandOptionType.Integer
|
|
5462
5477
|
| ApplicationCommandOptionType.Number
|
|
@@ -5652,11 +5667,8 @@ export type EmojiIdentifierResolvable =
|
|
|
5652
5667
|
|
|
5653
5668
|
export type EmojiResolvable = ApplicationEmoji | GuildEmoji | ReactionEmoji | Snowflake;
|
|
5654
5669
|
|
|
5655
|
-
export interface FetchApplicationCommandOptions extends
|
|
5670
|
+
export interface FetchApplicationCommandOptions extends FetchGuildApplicationCommandFetchOptions {
|
|
5656
5671
|
guildId?: Snowflake;
|
|
5657
|
-
id?: Snowflake;
|
|
5658
|
-
locale?: Locale;
|
|
5659
|
-
withLocalizations?: boolean;
|
|
5660
5672
|
}
|
|
5661
5673
|
|
|
5662
5674
|
export interface FetchArchivedThreadOptions {
|
|
@@ -5955,28 +5967,32 @@ export type GuildBanResolvable = GuildBan | UserResolvable;
|
|
|
5955
5967
|
|
|
5956
5968
|
export type GuildChannelResolvable = GuildBasedChannel | Snowflake;
|
|
5957
5969
|
|
|
5958
|
-
export interface AutoModerationRuleCreateOptions {
|
|
5970
|
+
export interface AutoModerationRuleCreateOptions extends AutoModerationRuleEditOptions {
|
|
5959
5971
|
actions: readonly AutoModerationActionOptions[];
|
|
5960
|
-
enabled?: boolean;
|
|
5961
5972
|
eventType: AutoModerationRuleEventType;
|
|
5973
|
+
name: string;
|
|
5974
|
+
triggerType: AutoModerationRuleTriggerType;
|
|
5975
|
+
}
|
|
5976
|
+
|
|
5977
|
+
export interface AutoModerationRuleEditOptions {
|
|
5978
|
+
actions?: readonly AutoModerationActionOptions[];
|
|
5979
|
+
enabled?: boolean;
|
|
5980
|
+
eventType?: AutoModerationRuleEventType;
|
|
5962
5981
|
exemptChannels?: ReadonlyCollection<Snowflake, GuildBasedChannel> | readonly GuildChannelResolvable[];
|
|
5963
5982
|
exemptRoles?: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[];
|
|
5964
|
-
name
|
|
5983
|
+
name?: string;
|
|
5965
5984
|
reason?: string;
|
|
5966
5985
|
triggerMetadata?: AutoModerationTriggerMetadataOptions;
|
|
5967
|
-
triggerType: AutoModerationRuleTriggerType;
|
|
5968
5986
|
}
|
|
5969
5987
|
|
|
5970
|
-
export interface
|
|
5971
|
-
|
|
5972
|
-
export interface AutoModerationTriggerMetadataOptions extends Partial<AutoModerationTriggerMetadata> {}
|
|
5988
|
+
export interface AutoModerationTriggerMetadataOptions extends AutoModerationTriggerMetadata {}
|
|
5973
5989
|
|
|
5974
5990
|
export interface AutoModerationActionOptions {
|
|
5975
5991
|
metadata?: AutoModerationActionMetadataOptions;
|
|
5976
5992
|
type: AutoModerationActionType;
|
|
5977
5993
|
}
|
|
5978
5994
|
|
|
5979
|
-
export interface AutoModerationActionMetadataOptions extends
|
|
5995
|
+
export interface AutoModerationActionMetadataOptions extends BaseAutoModerationActionMetadata {
|
|
5980
5996
|
channel?: GuildTextChannelResolvable | ThreadChannel;
|
|
5981
5997
|
}
|
|
5982
5998
|
|
|
@@ -6317,7 +6333,7 @@ export interface InteractionDeferUpdateOptions {
|
|
|
6317
6333
|
withResponse?: boolean;
|
|
6318
6334
|
}
|
|
6319
6335
|
|
|
6320
|
-
export interface InteractionReplyOptions extends
|
|
6336
|
+
export interface InteractionReplyOptions extends BaseMessageOptions, MessageOptionsPoll {
|
|
6321
6337
|
flags?:
|
|
6322
6338
|
| BitFieldResolvable<
|
|
6323
6339
|
Extract<MessageFlagsString, 'Ephemeral' | 'IsComponentsV2' | 'SuppressEmbeds' | 'SuppressNotifications'>,
|
|
@@ -6416,10 +6432,18 @@ export type CollectedMessageInteraction<Cached extends CacheType = CacheType> =
|
|
|
6416
6432
|
>;
|
|
6417
6433
|
|
|
6418
6434
|
export interface MessageComponentCollectorOptions<Interaction extends CollectedMessageInteraction>
|
|
6419
|
-
extends
|
|
6435
|
+
extends AwaitMessageComponentOptions<Interaction> {
|
|
6436
|
+
max?: number;
|
|
6437
|
+
maxComponents?: number;
|
|
6438
|
+
maxUsers?: number;
|
|
6439
|
+
}
|
|
6420
6440
|
|
|
6421
|
-
export interface MessageChannelComponentCollectorOptions<
|
|
6422
|
-
|
|
6441
|
+
export interface MessageChannelComponentCollectorOptions<
|
|
6442
|
+
Interaction extends CollectedMessageInteraction,
|
|
6443
|
+
Cached extends CacheType = CacheType,
|
|
6444
|
+
> extends MessageComponentCollectorOptions<Interaction> {
|
|
6445
|
+
message?: CacheTypeReducer<Cached, Message, APIMessage>;
|
|
6446
|
+
}
|
|
6423
6447
|
|
|
6424
6448
|
export interface MessageInteractionMetadata {
|
|
6425
6449
|
authorizingIntegrationOwners: APIAuthorizingIntegrationOwnersMap;
|
|
@@ -6488,30 +6512,45 @@ export interface BaseMessageOptions {
|
|
|
6488
6512
|
)[];
|
|
6489
6513
|
}
|
|
6490
6514
|
|
|
6491
|
-
export interface
|
|
6515
|
+
export interface MessageOptionsPoll {
|
|
6492
6516
|
poll?: JSONEncodable<RESTAPIPoll> | PollData;
|
|
6493
6517
|
}
|
|
6494
6518
|
|
|
6495
|
-
export interface
|
|
6496
|
-
enforceNonce?: boolean;
|
|
6519
|
+
export interface MessageOptionsFlags {
|
|
6497
6520
|
flags?:
|
|
6498
6521
|
| BitFieldResolvable<
|
|
6499
6522
|
Extract<MessageFlagsString, 'IsComponentsV2' | 'SuppressEmbeds' | 'SuppressNotifications'>,
|
|
6500
6523
|
MessageFlags.IsComponentsV2 | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
|
|
6501
6524
|
>
|
|
6502
6525
|
| undefined;
|
|
6503
|
-
|
|
6504
|
-
|
|
6526
|
+
}
|
|
6527
|
+
|
|
6528
|
+
export interface MessageOptionsTTS {
|
|
6505
6529
|
tts?: boolean;
|
|
6506
6530
|
}
|
|
6507
6531
|
|
|
6532
|
+
export interface MessageOptionsStickers {
|
|
6533
|
+
stickers?: readonly StickerResolvable[];
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6536
|
+
export interface BaseMessageCreateOptions
|
|
6537
|
+
extends BaseMessageOptions,
|
|
6538
|
+
MessageOptionsPoll,
|
|
6539
|
+
MessageOptionsFlags,
|
|
6540
|
+
MessageOptionsTTS,
|
|
6541
|
+
MessageOptionsStickers {
|
|
6542
|
+
enforceNonce?: boolean;
|
|
6543
|
+
nonce?: number | string;
|
|
6544
|
+
}
|
|
6545
|
+
|
|
6508
6546
|
export interface MessageCreateOptions extends BaseMessageCreateOptions {
|
|
6509
6547
|
messageReference?: MessageReferenceOptions;
|
|
6510
6548
|
}
|
|
6511
6549
|
|
|
6512
6550
|
export interface GuildForumThreadMessageCreateOptions
|
|
6513
6551
|
extends BaseMessageOptions,
|
|
6514
|
-
|
|
6552
|
+
MessageOptionsFlags,
|
|
6553
|
+
MessageOptionsStickers {}
|
|
6515
6554
|
|
|
6516
6555
|
export interface MessageEditAttachmentData {
|
|
6517
6556
|
id: Snowflake;
|
|
@@ -7031,7 +7070,10 @@ export interface WebhookClientDataURL {
|
|
|
7031
7070
|
url: string;
|
|
7032
7071
|
}
|
|
7033
7072
|
|
|
7034
|
-
export interface WebhookClientOptions
|
|
7073
|
+
export interface WebhookClientOptions {
|
|
7074
|
+
allowedMentions?: MessageMentionOptions;
|
|
7075
|
+
rest?: Partial<RESTOptions>;
|
|
7076
|
+
}
|
|
7035
7077
|
|
|
7036
7078
|
export interface WebhookDeleteOptions {
|
|
7037
7079
|
reason?: string;
|
|
@@ -7050,9 +7092,7 @@ export interface WebhookMessageEditOptions extends MessageEditOptions {
|
|
|
7050
7092
|
withComponents?: boolean;
|
|
7051
7093
|
}
|
|
7052
7094
|
|
|
7053
|
-
export interface InteractionEditReplyOptions
|
|
7054
|
-
extends WebhookMessageEditOptions,
|
|
7055
|
-
Pick<BaseMessageOptionsWithPoll, 'poll'> {
|
|
7095
|
+
export interface InteractionEditReplyOptions extends WebhookMessageEditOptions, MessageOptionsPoll {
|
|
7056
7096
|
message?: MessageResolvable | '@original';
|
|
7057
7097
|
}
|
|
7058
7098
|
|
|
@@ -7060,7 +7100,11 @@ export interface WebhookFetchMessageOptions {
|
|
|
7060
7100
|
threadId?: Snowflake;
|
|
7061
7101
|
}
|
|
7062
7102
|
|
|
7063
|
-
export interface WebhookMessageCreateOptions
|
|
7103
|
+
export interface WebhookMessageCreateOptions
|
|
7104
|
+
extends BaseMessageOptions,
|
|
7105
|
+
MessageOptionsPoll,
|
|
7106
|
+
MessageOptionsFlags,
|
|
7107
|
+
MessageOptionsTTS {
|
|
7064
7108
|
appliedTags?: readonly Snowflake[];
|
|
7065
7109
|
avatarURL?: string;
|
|
7066
7110
|
threadId?: Snowflake;
|