mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
tests(lint): Fix typings lint errors
This commit is contained in:
@@ -22,7 +22,7 @@ client.login('dsfsd754.4fds4f68d4f6sd46f4s.7878easfdsgdfFDSIJIO');
|
|||||||
|
|
||||||
export class TestCollector extends Collector<Snowflake, Message> {
|
export class TestCollector extends Collector<Snowflake, Message> {
|
||||||
public filter: CollectorFilter;
|
public filter: CollectorFilter;
|
||||||
public constructor(client: Client, filter: CollectorFilter, ) {
|
public constructor(client: Client, filter: CollectorFilter) {
|
||||||
super(client, filter);
|
super(client, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
30
typings/index.d.ts
vendored
30
typings/index.d.ts
vendored
@@ -242,7 +242,7 @@ declare module 'discord.js' {
|
|||||||
public lastKey(): K | undefined;
|
public lastKey(): K | undefined;
|
||||||
public lastKey(count: number): K[];
|
public lastKey(count: number): K[];
|
||||||
public map<T>(fn: (value: V, key: K, collection: Collection<K, V>) => T, thisArg?: any): T[];
|
public map<T>(fn: (value: V, key: K, collection: Collection<K, V>) => T, thisArg?: any): T[];
|
||||||
public partition(fn: (value: V, key: K, collection: Collection<K, V>) => boolean): [Collection<K, V>, Collection<K, V>]
|
public partition(fn: (value: V, key: K, collection: Collection<K, V>) => boolean): [Collection<K, V>, Collection<K, V>];
|
||||||
public random(): V | undefined;
|
public random(): V | undefined;
|
||||||
public random(count: number): V[];
|
public random(count: number): V[];
|
||||||
public randomKey(): K | undefined;
|
public randomKey(): K | undefined;
|
||||||
@@ -330,7 +330,7 @@ declare module 'discord.js' {
|
|||||||
public readonly owner: User;
|
public readonly owner: User;
|
||||||
public ownerID: Snowflake;
|
public ownerID: Snowflake;
|
||||||
public recipients: Collection<Snowflake, User>;
|
public recipients: Collection<Snowflake, User>;
|
||||||
public addUser(options: { user: UserResolvable, accessToken?: string, nick?: string }): Promise<GroupDMChannel>
|
public addUser(options: { user: UserResolvable, accessToken?: string, nick?: string }): Promise<GroupDMChannel>;
|
||||||
public edit (data: { icon?: string, name?: string }): Promise<GroupDMChannel>;
|
public edit (data: { icon?: string, name?: string }): Promise<GroupDMChannel>;
|
||||||
public equals(channel: GroupDMChannel): boolean;
|
public equals(channel: GroupDMChannel): boolean;
|
||||||
public iconURL(options?: AvatarOptions): string;
|
public iconURL(options?: AvatarOptions): string;
|
||||||
@@ -1015,7 +1015,7 @@ declare module 'discord.js' {
|
|||||||
public static cloneObject(obj: object): object;
|
public static cloneObject(obj: object): object;
|
||||||
public static convertToBuffer(ab: ArrayBuffer | string): Buffer;
|
public static convertToBuffer(ab: ArrayBuffer | string): Buffer;
|
||||||
public static delayFor(ms: number): Promise<void>;
|
public static delayFor(ms: number): Promise<void>;
|
||||||
public static discordSort<K, V extends { rawPosition: number; id: string; }>(collection: Collection<K, V>): Collection<K, V>
|
public static discordSort<K, V extends { rawPosition: number; id: string; }>(collection: Collection<K, V>): Collection<K, V>;
|
||||||
public static escapeMarkdown(text: string, onlyCodeBlock?: boolean, onlyInlineCode?: boolean): string;
|
public static escapeMarkdown(text: string, onlyCodeBlock?: boolean, onlyInlineCode?: boolean): string;
|
||||||
public static fetchRecommendedShards(token: string, guildsPerShard?: number): Promise<number>;
|
public static fetchRecommendedShards(token: string, guildsPerShard?: number): Promise<number>;
|
||||||
public static flatten(obj: object, ...props: { [key: string]: boolean | string }[]): object;
|
public static flatten(obj: object, ...props: { [key: string]: boolean | string }[]): object;
|
||||||
@@ -1033,7 +1033,7 @@ declare module 'discord.js' {
|
|||||||
relative: boolean,
|
relative: boolean,
|
||||||
sorted: Collection<Snowflake, T>,
|
sorted: Collection<Snowflake, T>,
|
||||||
route: object,
|
route: object,
|
||||||
reason?: string,
|
reason?: string
|
||||||
): Promise<{ id: Snowflake; position: number }[]>;
|
): Promise<{ id: Snowflake; position: number }[]>;
|
||||||
public static splitMessage(text: string, options?: SplitOptions): string | string[];
|
public static splitMessage(text: string, options?: SplitOptions): string | string[];
|
||||||
public static str2ab(str: string): ArrayBuffer;
|
public static str2ab(str: string): ArrayBuffer;
|
||||||
@@ -1350,7 +1350,7 @@ declare module 'discord.js' {
|
|||||||
send(content?: StringResolvable, options?: WebhookMessageOptions | MessageEmbed | MessageAttachment | MessageAttachment[]): Promise<Message | Message[]>;
|
send(content?: StringResolvable, options?: WebhookMessageOptions | MessageEmbed | MessageAttachment | MessageAttachment[]): Promise<Message | Message[]>;
|
||||||
send(options?: WebhookMessageOptions | MessageEmbed | MessageAttachment | MessageAttachment[]): Promise<Message | Message[]>;
|
send(options?: WebhookMessageOptions | MessageEmbed | MessageAttachment | MessageAttachment[]): Promise<Message | Message[]>;
|
||||||
sendSlackMessage(body: object): Promise<Message|object>;
|
sendSlackMessage(body: object): Promise<Message|object>;
|
||||||
}
|
};
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@@ -1405,7 +1405,7 @@ declare module 'discord.js' {
|
|||||||
BULK_DELETE_MESSAGE_TOO_OLD: number;
|
BULK_DELETE_MESSAGE_TOO_OLD: number;
|
||||||
INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT: number;
|
INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT: number;
|
||||||
REACTION_BLOCKED: number;
|
REACTION_BLOCKED: number;
|
||||||
}
|
};
|
||||||
|
|
||||||
type AddGuildMemberOptions = {
|
type AddGuildMemberOptions = {
|
||||||
accessToken: String;
|
accessToken: String;
|
||||||
@@ -1445,7 +1445,7 @@ declare module 'discord.js' {
|
|||||||
allow?: PermissionResolvable[] | number;
|
allow?: PermissionResolvable[] | number;
|
||||||
deny?: PermissionResolvable[] | number;
|
deny?: PermissionResolvable[] | number;
|
||||||
id: RoleResolvable | UserResolvable;
|
id: RoleResolvable | UserResolvable;
|
||||||
}
|
};
|
||||||
|
|
||||||
type ChannelData = {
|
type ChannelData = {
|
||||||
name?: string;
|
name?: string;
|
||||||
@@ -1571,17 +1571,17 @@ declare module 'discord.js' {
|
|||||||
Presence: typeof Presence;
|
Presence: typeof Presence;
|
||||||
Role: typeof Role;
|
Role: typeof Role;
|
||||||
User: typeof User;
|
User: typeof User;
|
||||||
}
|
};
|
||||||
|
|
||||||
type FetchMemberOptions = {
|
type FetchMemberOptions = {
|
||||||
user: UserResolvable;
|
user: UserResolvable;
|
||||||
cache?: boolean;
|
cache?: boolean;
|
||||||
}
|
};
|
||||||
|
|
||||||
type FetchMembersOptions = {
|
type FetchMembersOptions = {
|
||||||
query?: string;
|
query?: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
}
|
};
|
||||||
|
|
||||||
type FileOptions = {
|
type FileOptions = {
|
||||||
attachment: BufferResolvable;
|
attachment: BufferResolvable;
|
||||||
@@ -1629,7 +1629,7 @@ declare module 'discord.js' {
|
|||||||
EMOJI_CREATE?: number,
|
EMOJI_CREATE?: number,
|
||||||
EMOJI_UPDATE?: number,
|
EMOJI_UPDATE?: number,
|
||||||
EMOJI_DELETE?: number,
|
EMOJI_DELETE?: number,
|
||||||
MESSAGE_DELETE?: number,
|
MESSAGE_DELETE?: number
|
||||||
};
|
};
|
||||||
|
|
||||||
type GuildAuditLogsActionType = 'CREATE'
|
type GuildAuditLogsActionType = 'CREATE'
|
||||||
@@ -1809,7 +1809,7 @@ declare module 'discord.js' {
|
|||||||
type: string;
|
type: string;
|
||||||
allow?: string;
|
allow?: string;
|
||||||
deny?: string;
|
deny?: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
type OverwriteType = 'member' | 'role';
|
type OverwriteType = 'member' | 'role';
|
||||||
|
|
||||||
@@ -1855,7 +1855,7 @@ declare module 'discord.js' {
|
|||||||
allowed: PermissionResolvable;
|
allowed: PermissionResolvable;
|
||||||
denied: PermissionResolvable;
|
denied: PermissionResolvable;
|
||||||
id: UserResolvable | RoleResolvable;
|
id: UserResolvable | RoleResolvable;
|
||||||
}
|
};
|
||||||
|
|
||||||
type PresenceData = {
|
type PresenceData = {
|
||||||
status?: PresenceStatus;
|
status?: PresenceStatus;
|
||||||
@@ -1865,7 +1865,7 @@ declare module 'discord.js' {
|
|||||||
type?: ActivityType | number;
|
type?: ActivityType | number;
|
||||||
url?: string;
|
url?: string;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
type PresenceResolvable = Presence | UserResolvable | Snowflake;
|
type PresenceResolvable = Presence | UserResolvable | Snowflake;
|
||||||
|
|
||||||
@@ -1878,7 +1878,7 @@ declare module 'discord.js' {
|
|||||||
method: string;
|
method: string;
|
||||||
path: string;
|
path: string;
|
||||||
route: string;
|
route: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
type ReactionCollectorOptions = CollectorOptions & {
|
type ReactionCollectorOptions = CollectorOptions & {
|
||||||
max?: number;
|
max?: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user