aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushTextChannel.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
commita3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch)
tree9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/lib/extensions/discord.js/BushTextChannel.ts
parent5557677f1570eb564a30cfcebb6030235dc84d47 (diff)
downloadtanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/lib/extensions/discord.js/BushTextChannel.ts')
-rw-r--r--src/lib/extensions/discord.js/BushTextChannel.ts30
1 files changed, 29 insertions, 1 deletions
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;
+}