mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(Channel): add isText() type guard (#4745)
This commit is contained in:
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -187,6 +187,7 @@ declare module 'discord.js' {
|
||||
public type: keyof typeof ChannelType;
|
||||
public delete(reason?: string): Promise<Channel>;
|
||||
public fetch(force?: boolean): Promise<Channel>;
|
||||
public isText(): this is TextChannel | DMChannel | NewsChannel;
|
||||
public toString(): string;
|
||||
}
|
||||
|
||||
@@ -826,6 +827,7 @@ declare module 'discord.js' {
|
||||
options: PermissionOverwriteOption,
|
||||
reason?: string,
|
||||
): Promise<this>;
|
||||
public isText(): this is TextChannel | NewsChannel;
|
||||
}
|
||||
|
||||
export class GuildEmoji extends BaseGuildEmoji {
|
||||
|
||||
Reference in New Issue
Block a user