types: few missing thread channels (#5988)

This commit is contained in:
monbrey
2021-07-01 19:01:14 +10:00
committed by GitHub
parent 0eeb2775a5
commit 941cd86881

14
typings/index.d.ts vendored
View File

@@ -563,7 +563,7 @@ declare module 'discord.js' {
export class CommandInteraction extends Interaction { export class CommandInteraction extends Interaction {
public readonly command: ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null; public readonly command: ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
public readonly channel: TextChannel | DMChannel | NewsChannel | PartialDMChannel | null; public readonly channel: TextChannel | DMChannel | NewsChannel | PartialDMChannel | ThreadChannel | null;
public channelID: Snowflake; public channelID: Snowflake;
public commandID: Snowflake; public commandID: Snowflake;
public commandName: string; public commandName: string;
@@ -1412,11 +1412,11 @@ declare module 'discord.js' {
} }
export class MessageCollector extends Collector<Snowflake, Message> { export class MessageCollector extends Collector<Snowflake, Message> {
constructor(channel: TextChannel | DMChannel, options?: MessageCollectorOptions); constructor(channel: TextChannel | DMChannel | ThreadChannel, options?: MessageCollectorOptions);
private _handleChannelDeletion(channel: GuildChannel): void; private _handleChannelDeletion(channel: GuildChannel): void;
private _handleGuildDeletion(guild: Guild): void; private _handleGuildDeletion(guild: Guild): void;
public channel: Channel; public channel: TextChannel | DMChannel | ThreadChannel;
public readonly endReason: string | null; public readonly endReason: string | null;
public options: MessageCollectorOptions; public options: MessageCollectorOptions;
public received: number; public received: number;
@@ -1426,7 +1426,7 @@ declare module 'discord.js' {
} }
export class MessageComponentInteraction extends Interaction { export class MessageComponentInteraction extends Interaction {
public readonly channel: TextChannel | DMChannel | NewsChannel | PartialDMChannel | null; public readonly channel: TextChannel | DMChannel | NewsChannel | PartialDMChannel | ThreadChannel | null;
public readonly component: MessageActionRowComponent | Exclude<APIMessageComponent, APIActionRowComponent> | null; public readonly component: MessageActionRowComponent | Exclude<APIMessageComponent, APIActionRowComponent> | null;
public componentType: MessageComponentType; public componentType: MessageComponentType;
public customID: string; public customID: string;
@@ -1457,14 +1457,14 @@ declare module 'discord.js' {
export class MessageComponentInteractionCollector extends Collector<Snowflake, MessageComponentInteraction> { export class MessageComponentInteractionCollector extends Collector<Snowflake, MessageComponentInteraction> {
constructor( constructor(
source: Message | TextChannel | NewsChannel | DMChannel, source: Message | TextChannel | DMChannel | ThreadChannel,
options?: MessageComponentInteractionCollectorOptions, options?: MessageComponentInteractionCollectorOptions,
); );
private _handleMessageDeletion(message: Message): void; private _handleMessageDeletion(message: Message): void;
private _handleChannelDeletion(channel: GuildChannel): void; private _handleChannelDeletion(channel: GuildChannel): void;
private _handleGuildDeletion(guild: Guild): void; private _handleGuildDeletion(guild: Guild): void;
public channel: TextChannel | NewsChannel | DMChannel; public channel: TextChannel | DMChannel | ThreadChannel;
public empty(): void; public empty(): void;
public readonly endReason: string | null; public readonly endReason: string | null;
public message: Message | null; public message: Message | null;
@@ -2595,7 +2595,7 @@ declare module 'discord.js' {
} }
export class MessageManager extends BaseManager<Snowflake, Message, MessageResolvable> { export class MessageManager extends BaseManager<Snowflake, Message, MessageResolvable> {
constructor(channel: TextChannel | DMChannel, iterable?: Iterable<any>); constructor(channel: TextChannel | DMChannel | ThreadChannel, iterable?: Iterable<any>);
public channel: TextBasedChannelFields; public channel: TextBasedChannelFields;
public cache: Collection<Snowflake, Message>; public cache: Collection<Snowflake, Message>;
public crosspost(message: MessageResolvable): Promise<Message>; public crosspost(message: MessageResolvable): Promise<Message>;