feat: BaseChannel.isStage

This commit is contained in:
Yuzu 2022-07-04 12:35:17 -05:00
parent 9a5a25c2d5
commit 948cd2f717
2 changed files with 5 additions and 3 deletions

View File

@ -1,8 +1,5 @@
{
"fmt": {
"files": {
"exclude": "vendor"
},
"options": {
"indentWidth": 4,
"lineWidth": 120

View File

@ -7,6 +7,7 @@ import type VoiceChannel from "./VoiceChannel.ts";
import type DMChannel from "./DMChannel.ts";
import type NewsChannel from "./NewsChannel.ts";
import type ThreadChannel from "./ThreadChannel.ts";
import type StageChannel from "./StageChannel.ts";
import { ChannelTypes } from "../../vendor/external.ts";
import { textBasedChannels } from "./TextChannel.ts";
@ -43,6 +44,10 @@ export abstract class BaseChannel implements Model {
return this.type === ChannelTypes.GuildPublicThread || this.type === ChannelTypes.GuildPrivateThread;
}
isStage(): this is StageChannel {
return this.type === ChannelTypes.GuildStageVoice;
}
toString(): string {
return `<#${this.id}>`;
}