From 948cd2f717d316502288c85d51e35180b1a6e519 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Mon, 4 Jul 2022 12:35:17 -0500 Subject: [PATCH] feat: BaseChannel.isStage --- deno.json | 3 --- structures/channels/BaseChannel.ts | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deno.json b/deno.json index 25bec05..d010978 100644 --- a/deno.json +++ b/deno.json @@ -1,8 +1,5 @@ { "fmt": { - "files": { - "exclude": "vendor" - }, "options": { "indentWidth": 4, "lineWidth": 120 diff --git a/structures/channels/BaseChannel.ts b/structures/channels/BaseChannel.ts index fc88e18..deb1809 100644 --- a/structures/channels/BaseChannel.ts +++ b/structures/channels/BaseChannel.ts @@ -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}>`; }