From a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 23 Jan 2022 18:13:05 -0500 Subject: fix discord.js breaking changes, some other stuff --- src/lib/extensions/discord.js/BushTextChannel.ts | 30 +++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/lib/extensions/discord.js/BushTextChannel.ts') diff --git a/src/lib/extensions/discord.js/BushTextChannel.ts b/src/lib/extensions/discord.js/BushTextChannel.ts index 45e1200..15be7bd 100644 --- a/src/lib/extensions/discord.js/BushTextChannel.ts +++ b/src/lib/extensions/discord.js/BushTextChannel.ts @@ -1,4 +1,19 @@ -import type { BushGuild, BushMessageManager, BushThreadManager } from '#lib'; +/* eslint-disable deprecation/deprecation */ +import type { + BushCategoryChannel, + BushDMChannel, + BushGuild, + BushGuildBasedChannel, + BushMessageManager, + BushNewsChannel, + BushStageChannel, + BushStoreChannel, + BushTextBasedChannel, + BushThreadChannel, + BushThreadManager, + BushVoiceBasedChannel, + BushVoiceChannel +} from '#lib'; import { TextChannel, type AllowedThreadTypeForTextChannel } from 'discord.js'; import type { RawGuildChannelData } from 'discord.js/typings/rawDataTypes'; @@ -14,3 +29,16 @@ export class BushTextChannel extends TextChannel { super(guild, data); } } + +export interface BushTextChannel extends TextChannel { + isText(): this is BushTextChannel; + isDM(): this is BushDMChannel; + isVoice(): this is BushVoiceChannel; + isCategory(): this is BushCategoryChannel; + isNews(): this is BushNewsChannel; + isStore(): this is BushStoreChannel; + isThread(): this is BushThreadChannel; + isStage(): this is BushStageChannel; + isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel; + isVoiceBased(): this is BushVoiceBasedChannel; +} -- cgit