fix eslint + ts
This commit is contained in:
parent
039dd34cf2
commit
e03565bdd8
43
typings/index.d.ts
vendored
43
typings/index.d.ts
vendored
@ -237,7 +237,6 @@ export class DiscordAuthWebsocket extends EventEmitter {
|
|||||||
public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
|
public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export interface ExternalAssets {
|
export interface ExternalAssets {
|
||||||
url: string;
|
url: string;
|
||||||
external_asset_path: string;
|
external_asset_path: string;
|
||||||
@ -870,7 +869,9 @@ export class ClientUser extends User {
|
|||||||
public pronouns?: string;
|
public pronouns?: string;
|
||||||
public premiumType: number;
|
public premiumType: number;
|
||||||
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
||||||
public setHypeSquad(hypesquad: 0 | 1 | 2 | 3 | 'LEAVE' | 'HOUSE_BRAVERY' | 'HOUSE_BRILLIANCE' | 'HOUSE_BALANCE'): Promise<void>;
|
public setHypeSquad(
|
||||||
|
hypesquad: 0 | 1 | 2 | 3 | 'LEAVE' | 'HOUSE_BRAVERY' | 'HOUSE_BRILLIANCE' | 'HOUSE_BALANCE',
|
||||||
|
): Promise<void>;
|
||||||
public setAccentColor(color: ColorResolvable): Promise<this>;
|
public setAccentColor(color: ColorResolvable): Promise<this>;
|
||||||
public setAboutMe(bio: string | null): Promise<this>;
|
public setAboutMe(bio: string | null): Promise<this>;
|
||||||
public createFriendInvite(): Promise<Invite>;
|
public createFriendInvite(): Promise<Invite>;
|
||||||
@ -1271,7 +1272,12 @@ export class Guild extends AnonymousGuild {
|
|||||||
public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
|
public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
|
||||||
public toJSON(): unknown;
|
public toJSON(): unknown;
|
||||||
public markAsRead(): Promise<void>;
|
public markAsRead(): Promise<void>;
|
||||||
public setCommunity(stats: Boolean, publicUpdatesChannel?: GuildTextChannelResolvable, rulesChannel?: GuildTextChannelResolvable, reason?: string): Promise<this>;
|
public setCommunity(
|
||||||
|
stats: boolean,
|
||||||
|
publicUpdatesChannel?: GuildTextChannelResolvable,
|
||||||
|
rulesChannel?: GuildTextChannelResolvable,
|
||||||
|
reason?: string,
|
||||||
|
): Promise<this>;
|
||||||
public topEmojis(): Promise<Collection<number, GuildEmoji>>;
|
public topEmojis(): Promise<Collection<number, GuildEmoji>>;
|
||||||
public setVanityCode(code?: string): Promise<this>;
|
public setVanityCode(code?: string): Promise<this>;
|
||||||
}
|
}
|
||||||
@ -1562,7 +1568,7 @@ export class HTTPError extends Error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tslint:disable-next-line:no-empty-interface - Merge RateLimitData into RateLimitError to not have to type it again
|
// tslint:disable-next-line:no-empty-interface - Merge RateLimitData into RateLimitError to not have to type it again
|
||||||
export interface RateLimitError extends RateLimitData { }
|
export interface RateLimitError extends RateLimitData {}
|
||||||
export class RateLimitError extends Error {
|
export class RateLimitError extends Error {
|
||||||
private constructor(data: RateLimitData);
|
private constructor(data: RateLimitData);
|
||||||
public name: 'RateLimitError';
|
public name: 'RateLimitError';
|
||||||
@ -1881,8 +1887,11 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|||||||
public inGuild(): this is Message<true> & this;
|
public inGuild(): this is Message<true> & this;
|
||||||
|
|
||||||
public readonly isMessage: true;
|
public readonly isMessage: true;
|
||||||
public clickButton(button?: { X: number, Y: number } | string): Promise<Message | Modal>;
|
public clickButton(button?: { X: number; Y: number } | string): Promise<Message | Modal>;
|
||||||
public selectMenu(menu: 0 | 1 | 2 | 3 | 4 | string, vales: Array<UserResolvable | RoleResolvable | ChannelResolvable | string>): Promise<Message | Modal>;
|
public selectMenu(
|
||||||
|
menu: 0 | 1 | 2 | 3 | 4 | string,
|
||||||
|
vales: (UserResolvable | RoleResolvable | ChannelResolvable | string)[],
|
||||||
|
): Promise<Message | Modal>;
|
||||||
public markUnread(): Promise<void>;
|
public markUnread(): Promise<void>;
|
||||||
public markRead(): Promise<void>;
|
public markRead(): Promise<void>;
|
||||||
}
|
}
|
||||||
@ -4792,9 +4801,9 @@ export interface AutoModerationRuleCreateOptions {
|
|||||||
reason?: string;
|
reason?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AutoModerationRuleEditOptions extends Partial<Omit<AutoModerationRuleCreateOptions, 'triggerType'>> { }
|
export interface AutoModerationRuleEditOptions extends Partial<Omit<AutoModerationRuleCreateOptions, 'triggerType'>> {}
|
||||||
|
|
||||||
export interface AutoModerationTriggerMetadataOptions extends Partial<AutoModerationTriggerMetadata> { }
|
export interface AutoModerationTriggerMetadataOptions extends Partial<AutoModerationTriggerMetadata> {}
|
||||||
|
|
||||||
export interface AutoModerationActionOptions {
|
export interface AutoModerationActionOptions {
|
||||||
type: AutoModerationActionType | AutoModerationActionTypes;
|
type: AutoModerationActionType | AutoModerationActionTypes;
|
||||||
@ -5855,8 +5864,8 @@ export interface GuildAuditLogsEntryTargetField<TActionType extends GuildAuditLo
|
|||||||
INVITE: Invite;
|
INVITE: Invite;
|
||||||
MESSAGE: TActionType extends 'MESSAGE_BULK_DELETE' ? Guild | { id: Snowflake } : User;
|
MESSAGE: TActionType extends 'MESSAGE_BULK_DELETE' ? Guild | { id: Snowflake } : User;
|
||||||
INTEGRATION: Integration;
|
INTEGRATION: Integration;
|
||||||
CHANNEL: NonThreadGuildBasedChannel | { id: Snowflake;[x: string]: unknown };
|
CHANNEL: NonThreadGuildBasedChannel | { id: Snowflake; [x: string]: unknown };
|
||||||
THREAD: ThreadChannel | { id: Snowflake;[x: string]: unknown };
|
THREAD: ThreadChannel | { id: Snowflake; [x: string]: unknown };
|
||||||
STAGE_INSTANCE: StageInstance;
|
STAGE_INSTANCE: StageInstance;
|
||||||
STICKER: Sticker;
|
STICKER: Sticker;
|
||||||
GUILD_SCHEDULED_EVENT: GuildScheduledEvent;
|
GUILD_SCHEDULED_EVENT: GuildScheduledEvent;
|
||||||
@ -6483,9 +6492,7 @@ export interface BaseMessageSelectMenuOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface StringMessageSelectMenuOptions extends BaseMessageSelectMenuOptions {
|
export interface StringMessageSelectMenuOptions extends BaseMessageSelectMenuOptions {
|
||||||
type?:
|
type?: 'STRING_SELECT' | SelectMenuComponentTypes.STRING_SELECT;
|
||||||
| 'STRING_SELECT'
|
|
||||||
| SelectMenuComponentTypes.STRING_SELECT
|
|
||||||
options?: MessageSelectOptionData[];
|
options?: MessageSelectOptionData[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6699,18 +6706,18 @@ export type Partialize<
|
|||||||
partial: true;
|
partial: true;
|
||||||
} & {
|
} & {
|
||||||
[K in keyof Omit<T, 'client' | 'id' | 'partial' | E>]: K extends N ? null : K extends M ? T[K] | null : T[K];
|
[K in keyof Omit<T, 'client' | 'id' | 'partial' | E>]: K extends N ? null : K extends M ? T[K] | null : T[K];
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'lastMessageId'> {
|
export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'lastMessageId'> {
|
||||||
lastMessageId: undefined;
|
lastMessageId: undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp'> { }
|
export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp'> {}
|
||||||
|
|
||||||
export interface PartialMessage
|
export interface PartialMessage
|
||||||
extends Partialize<Message, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> { }
|
extends Partialize<Message, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> {}
|
||||||
|
|
||||||
export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> { }
|
export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> {}
|
||||||
|
|
||||||
export interface PartialOverwriteData {
|
export interface PartialOverwriteData {
|
||||||
id: Snowflake | number;
|
id: Snowflake | number;
|
||||||
@ -6725,7 +6732,7 @@ export interface PartialRoleData extends RoleData {
|
|||||||
|
|
||||||
export type PartialTypes = 'USER' | 'CHANNEL' | 'GUILD_MEMBER' | 'MESSAGE' | 'REACTION' | 'GUILD_SCHEDULED_EVENT';
|
export type PartialTypes = 'USER' | 'CHANNEL' | 'GUILD_MEMBER' | 'MESSAGE' | 'REACTION' | 'GUILD_SCHEDULED_EVENT';
|
||||||
|
|
||||||
export interface PartialUser extends Partialize<User, 'username' | 'tag' | 'discriminator'> { }
|
export interface PartialUser extends Partialize<User, 'username' | 'tag' | 'discriminator'> {}
|
||||||
|
|
||||||
export type PresenceStatusData = ClientPresenceStatus | 'invisible';
|
export type PresenceStatusData = ClientPresenceStatus | 'invisible';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user