diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 9dbde4c46e4e..2cf49f108e09 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -659,7 +659,7 @@ export class BaseGuildEmoji extends Emoji { } // tslint:disable-next-line no-empty-interface -export interface BaseGuildTextChannel extends TextBasedChannelFields { } +export interface BaseGuildTextChannel extends TextBasedChannelFields {} export class BaseGuildTextChannel extends GuildChannel { protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean); public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; @@ -680,7 +680,7 @@ export class BaseGuildTextChannel extends GuildChannel { } // tslint:disable-next-line no-empty-interface -export interface BaseGuildVoiceChannel extends Omit, 'lastPinTimestamp' | 'lastPinAt'> { } +export interface BaseGuildVoiceChannel extends Omit, 'lastPinTimestamp' | 'lastPinAt'> {} export class BaseGuildVoiceChannel extends GuildChannel { public constructor(guild: Guild, data?: RawGuildChannelData); public bitrate: number; @@ -854,11 +854,11 @@ export { StringSelectMenuComponent as SelectMenuComponent, }; -export class UserSelectMenuComponent extends BaseSelectMenuComponent { } +export class UserSelectMenuComponent extends BaseSelectMenuComponent {} -export class RoleSelectMenuComponent extends BaseSelectMenuComponent { } +export class RoleSelectMenuComponent extends BaseSelectMenuComponent {} -export class MentionableSelectMenuComponent extends BaseSelectMenuComponent { } +export class MentionableSelectMenuComponent extends BaseSelectMenuComponent {} export class ChannelSelectMenuComponent extends BaseSelectMenuComponent { public getChannelTypes(): ChannelType[] | null; @@ -885,9 +885,9 @@ export interface IconData { proxyIconURL?: string; } -export interface EmbedAuthorData extends Omit, IconData { } +export interface EmbedAuthorData extends Omit, IconData {} -export interface EmbedFooterData extends Omit, IconData { } +export interface EmbedFooterData extends Omit, IconData {} export interface EmbedAssetData extends Omit { proxyURL?: string; @@ -981,8 +981,8 @@ export abstract class BaseChannel extends Base { export type If = Value extends true ? TrueResult : Value extends false - ? FalseResult - : TrueResult | FalseResult; + ? FalseResult + : TrueResult | FalseResult; export class Client extends BaseClient { public constructor(options: ClientOptions); @@ -1241,8 +1241,8 @@ export class CommandInteractionOptionResolver['channel']>, { type: Type extends ChannelType.PublicThread | ChannelType.AnnouncementThread - ? ChannelType.PublicThread | ChannelType.AnnouncementThread - : Type; + ? ChannelType.PublicThread | ChannelType.AnnouncementThread + : Type; } >; /** @@ -1259,8 +1259,8 @@ export class CommandInteractionOptionResolver['channel']>, { type: Type extends ChannelType.PublicThread | ChannelType.AnnouncementThread - ? ChannelType.PublicThread | ChannelType.AnnouncementThread - : Type; + ? ChannelType.PublicThread | ChannelType.AnnouncementThread + : Type; } > | null; public getString(name: string, required: true): string; @@ -1313,7 +1313,7 @@ export interface DMChannel extends Omit< TextBasedChannelFields, 'bulkDelete' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW' - > { } + > {} export class DMChannel extends BaseChannel { private constructor(client: Client, data?: RawDMChannelData); public flags: Readonly; @@ -1493,11 +1493,11 @@ export class GuildAuditLogs { private constructor(guild: Guild, data: RawGuildAuditLogEntryData, logs?: GuildAuditLogs); @@ -1595,7 +1595,7 @@ export class GuildMemberFlagsBitField extends BitField { public static resolve(bit?: BitFieldResolvable): number; } -export interface GuildMember extends PartialTextBasedChannelFields { } +export interface GuildMember extends PartialTextBasedChannelFields {} export class GuildMember extends Base { private constructor(client: Client, data: RawGuildMemberData, guild: Guild); private _roles: Snowflake[]; @@ -1845,10 +1845,10 @@ export type CacheTypeReducer< > = [State] extends ['cached'] ? CachedType : [State] extends ['raw'] - ? RawType - : [State] extends ['raw' | 'cached'] - ? PresentType - : Fallback; + ? RawType + : [State] extends ['raw' | 'cached'] + ? PresentType + : Fallback; export type Interaction = | ChatInputCommandInteraction @@ -1954,7 +1954,7 @@ export class InteractionCollector exte } // tslint:disable-next-line no-empty-interface -export interface InteractionWebhook extends PartialWebhookFields { } +export interface InteractionWebhook extends PartialWebhookFields {} export class InteractionWebhook { public constructor(client: Client, id: Snowflake, token: string); public readonly client: Client; @@ -2043,9 +2043,9 @@ export interface AwaitMessageCollectorOptionsParams< ComponentType extends MessageComponentType, Cached extends boolean = boolean, > extends Pick< - InteractionCollectorOptions[ComponentType]>, - keyof AwaitMessageComponentOptions -> { + InteractionCollectorOptions[ComponentType]>, + keyof AwaitMessageComponentOptions + > { componentType?: ComponentType; } @@ -2111,9 +2111,9 @@ export class Message extends Base { public roleSubscriptionData: RoleSubscriptionData | null; public resolved: CommandInteractionResolvedData | null; public system: boolean; - public poll: Poll | null; public get thread(): AnyThreadChannel | null; public tts: boolean; + public poll: Poll | null; public type: MessageType; public get url(): string; public webhookId: Snowflake | null; @@ -2512,7 +2512,7 @@ export interface ThreadOnlyChannel | 'awaitMessages' | 'createMessageComponentCollector' | 'awaitMessageComponent' - > { } + > {} export abstract class ThreadOnlyChannel extends GuildChannel { public type: ChannelType.GuildForum | ChannelType.GuildMedia; public threads: GuildForumThreadManager; @@ -3211,7 +3211,7 @@ export interface PrivateThreadChannel extends ThreadChannel { // tslint:disable-next-line no-empty-interface export interface ThreadChannel - extends Omit, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> { } + extends Omit, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> {} export class ThreadChannel extends BaseChannel { private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client); public archived: boolean | null; @@ -3308,7 +3308,7 @@ export class Typing extends Base { } // tslint:disable-next-line no-empty-interface -export interface User extends PartialTextBasedChannelFields { } +export interface User extends PartialTextBasedChannelFields {} export class User extends Base { protected constructor(client: Client, data: RawUserData); private _equals(user: APIUser): boolean; @@ -3569,7 +3569,7 @@ export class VoiceState extends Base { } // tslint:disable-next-line no-empty-interface -export interface Webhook extends WebhookFields { } +export interface Webhook extends WebhookFields {} export class Webhook { private constructor(client: Client, data?: RawWebhookData); public avatar: string | null; @@ -3584,8 +3584,8 @@ export class Webhook { public token: Type extends WebhookType.Incoming ? string : Type extends WebhookType.ChannelFollower - ? null - : string | null; + ? null + : string | null; public type: Type; public applicationId: Type extends WebhookType.Application ? Snowflake : null; public get channel(): TextChannel | VoiceChannel | NewsChannel | StageChannel | ForumChannel | MediaChannel | null; @@ -3605,7 +3605,7 @@ export class Webhook { } // tslint:disable-next-line no-empty-interface -export interface WebhookClient extends WebhookFields, BaseClient { } +export interface WebhookClient extends WebhookFields, BaseClient {} export class WebhookClient extends BaseClient { public constructor(data: WebhookClientData, options?: WebhookClientOptions); public readonly client: this; @@ -4091,23 +4091,23 @@ export class ApplicationCommandPermissionsManager< public remove( options: | (FetchSingleOptions & { - token: string; - channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; - roles?: readonly (RoleResolvable | RolePermissionConstant)[]; - users: readonly UserResolvable[]; - }) + token: string; + channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; + roles?: readonly (RoleResolvable | RolePermissionConstant)[]; + users: readonly UserResolvable[]; + }) | (FetchSingleOptions & { - token: string; - channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; - roles: readonly (RoleResolvable | RolePermissionConstant)[]; - users?: readonly UserResolvable[]; - }) + token: string; + channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; + roles: readonly (RoleResolvable | RolePermissionConstant)[]; + users?: readonly UserResolvable[]; + }) | (FetchSingleOptions & { - token: string; - channels: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; - roles?: readonly (RoleResolvable | RolePermissionConstant)[]; - users?: readonly UserResolvable[]; - }), + token: string; + channels: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; + roles?: readonly (RoleResolvable | RolePermissionConstant)[]; + users?: readonly UserResolvable[]; + }), ): Promise; public set( options: FetchSingleOptions & EditApplicationCommandPermissionsMixin, @@ -4185,7 +4185,7 @@ export class EntitlementManager extends CachedManager; } -export interface FetchGuildApplicationCommandFetchOptions extends Omit { } +export interface FetchGuildApplicationCommandFetchOptions extends Omit {} export class GuildApplicationCommandManager extends ApplicationCommandManager { private constructor(guild: Guild, iterable?: Iterable); @@ -4639,7 +4639,7 @@ export interface WebhookFields extends PartialWebhookFields { //#region Typedefs -export interface ActivitiesOptions extends Omit { } +export interface ActivitiesOptions extends Omit {} export interface ActivityOptions { name: string; @@ -4995,10 +4995,10 @@ export interface AutoModerationTriggerMetadata { } export interface AwaitMessageComponentOptions - extends Omit, 'max' | 'maxComponents' | 'maxUsers'> { } + extends Omit, 'max' | 'maxComponents' | 'maxUsers'> {} export interface ModalSubmitInteractionCollectorOptions - extends Omit, 'channel' | 'message' | 'guild' | 'interactionType'> { } + extends Omit, 'channel' | 'message' | 'guild' | 'interactionType'> {} export interface AwaitModalSubmitOptions extends Omit, 'max' | 'maxComponents' | 'maxUsers'> { @@ -5020,7 +5020,7 @@ export interface BanOptions { reason?: string; } -export interface BulkBanOptions extends Omit { } +export interface BulkBanOptions extends Omit {} export interface BulkBanResult { bannedUsers: readonly Snowflake[]; @@ -5108,8 +5108,8 @@ export type CacheFactory = ( export type CacheWithLimitsOptions = { [K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager - ? LimitedCollectionOptions | number - : never; + ? LimitedCollectionOptions | number + : never; }; export interface CategoryCreateChannelOptions { @@ -5358,9 +5358,9 @@ export interface CommandInteractionResolvedData { focused: true; type: - | ApplicationCommandOptionType.String - | ApplicationCommandOptionType.Integer - | ApplicationCommandOptionType.Number; + | ApplicationCommandOptionType.String + | ApplicationCommandOptionType.Integer + | ApplicationCommandOptionType.Number; value: string; } @@ -5774,20 +5774,20 @@ export interface GuildAuditLogsEntryExtraField { [AuditLogEvent.MessageUnpin]: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake }; [AuditLogEvent.MemberDisconnect]: { count: number }; [AuditLogEvent.ChannelOverwriteCreate]: - | Role - | GuildMember - | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } - | { id: Snowflake; type: AuditLogOptionsType.Member }; + | Role + | GuildMember + | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } + | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.ChannelOverwriteUpdate]: - | Role - | GuildMember - | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } - | { id: Snowflake; type: AuditLogOptionsType.Member }; + | Role + | GuildMember + | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } + | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.ChannelOverwriteDelete]: - | Role - | GuildMember - | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } - | { id: Snowflake; type: AuditLogOptionsType.Member }; + | Role + | GuildMember + | { id: Snowflake; name: string; type: AuditLogOptionsType.Role } + | { id: Snowflake; type: AuditLogOptionsType.Member }; [AuditLogEvent.StageInstanceCreate]: StageChannel | { id: Snowflake }; [AuditLogEvent.StageInstanceDelete]: StageChannel | { id: Snowflake }; [AuditLogEvent.StageInstanceUpdate]: StageChannel | { id: Snowflake }; @@ -5816,8 +5816,8 @@ export interface GuildAuditLogsEntryTargetField> { } +export interface AutoModerationRuleEditOptions extends Partial> {} -export interface AutoModerationTriggerMetadataOptions extends Partial { } +export interface AutoModerationTriggerMetadataOptions extends Partial {} export interface AutoModerationActionOptions { type: AutoModerationActionType; @@ -6072,10 +6072,10 @@ export type GuildScheduledEventResolvable = Snowflake | GuildScheduledEvent; export type GuildScheduledEventSetStatusArg = Status extends GuildScheduledEventStatus.Scheduled - ? GuildScheduledEventStatus.Active | GuildScheduledEventStatus.Canceled - : Status extends GuildScheduledEventStatus.Active - ? GuildScheduledEventStatus.Completed - : never; + ? GuildScheduledEventStatus.Active | GuildScheduledEventStatus.Canceled + : Status extends GuildScheduledEventStatus.Active + ? GuildScheduledEventStatus.Completed + : never; export interface GuildScheduledEventUser { guildScheduledEventId: Snowflake; @@ -6152,7 +6152,7 @@ export interface InteractionDeferReplyOptions { fetchReply?: boolean; } -export interface InteractionDeferUpdateOptions extends Omit { } +export interface InteractionDeferUpdateOptions extends Omit {} export interface InteractionReplyOptions extends BaseMessageOptions { tts?: boolean; @@ -6266,10 +6266,10 @@ export type CollectedMessageInteraction = >; export interface MessageComponentCollectorOptions - extends Omit, 'channel' | 'message' | 'guild' | 'interactionType'> { } + extends Omit, 'channel' | 'message' | 'guild' | 'interactionType'> {} export interface MessageChannelComponentCollectorOptions - extends Omit, 'channel' | 'guild' | 'interactionType'> { } + extends Omit, 'channel' | 'guild' | 'interactionType'> {} export interface MessageInteraction { id: Snowflake; @@ -6328,7 +6328,7 @@ export interface MessageCreateOptions extends BaseMessageOptions { export interface GuildForumThreadMessageCreateOptions extends BaseMessageOptions, - Pick { } + Pick {} export interface MessageEditAttachmentData { id: Snowflake; @@ -6448,7 +6448,7 @@ export type PermissionResolvable = BitFieldResolvable extends ReadonlyArray> { } +export interface RecursiveReadonlyArray extends ReadonlyArray> {} export interface PartialRecipient { username: string; @@ -6494,30 +6494,30 @@ export type Partialize< NullableKeys extends keyof PartialType | null = null, OverridableKeys extends keyof PartialType | '' = '', > = { - [K in keyof Omit]: K extends 'partial' + [K in keyof Omit]: K extends 'partial' ? true : K extends NulledKeys - ? null - : K extends NullableKeys - ? PartialType[K] | null - : PartialType[K]; - }; + ? null + : K extends NullableKeys + ? PartialType[K] | null + : PartialType[K]; +}; export interface PartialDMChannel extends Partialize { lastMessageId: undefined; } -export interface PartialGuildMember extends Partialize { } +export interface PartialGuildMember extends Partialize {} export interface PartialMessage - extends Partialize { } + extends Partialize {} -export interface PartialMessageReaction extends Partialize { } +export interface PartialMessageReaction extends Partialize {} export interface PartialGuildScheduledEvent - extends Partialize { } + extends Partialize {} -export interface PartialThreadMember extends Partialize { } +export interface PartialThreadMember extends Partialize {} export interface PartialOverwriteData { id: Snowflake | number; @@ -6540,7 +6540,7 @@ export enum Partials { ThreadMember, } -export interface PartialUser extends Partialize { } +export interface PartialUser extends Partialize {} export type PresenceStatusData = ClientPresenceStatus | 'invisible'; @@ -6697,8 +6697,8 @@ export interface SweeperDefinitions { export type SweeperOptions = { [Key in keyof SweeperDefinitions]?: SweeperDefinitions[Key][2] extends true - ? SweepOptions | LifetimeSweepOptions - : SweepOptions; + ? SweepOptions | LifetimeSweepOptions + : SweepOptions; }; export interface LimitedCollectionOptions { @@ -6800,7 +6800,7 @@ export interface WebhookClientDataURL { url: string; } -export interface WebhookClientOptions extends Pick { } +export interface WebhookClientOptions extends Pick {} export interface WebhookDeleteOptions { token?: string; @@ -6883,14 +6883,14 @@ export interface ClientApplicationInstallParams { export type Serialized = Value extends symbol | bigint | (() => any) ? never : Value extends number | string | boolean | undefined - ? Value - : Value extends JSONEncodable - ? JSONResult - : Value extends ReadonlyArray - ? Serialized[] - : Value extends ReadonlyMap | ReadonlySet - ? {} - : { [K in keyof Value]: Serialized }; + ? Value + : Value extends JSONEncodable + ? JSONResult + : Value extends ReadonlyArray + ? Serialized[] + : Value extends ReadonlyMap | ReadonlySet + ? {} + : { [K in keyof Value]: Serialized }; //#endregion