From af12073fcc6ef1b50f4ecb64db42a0fa6a6fc361 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 28 Jan 2026 22:28:53 +0100 Subject: [PATCH] Add basic thread helper functions --- src/util/entities/Channel.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/util/entities/Channel.ts b/src/util/entities/Channel.ts index 65e4a0007..e978a9c6d 100644 --- a/src/util/entities/Channel.ts +++ b/src/util/entities/Channel.ts @@ -424,6 +424,18 @@ export class Channel extends BaseClass { return this.type === ChannelType.DM || this.type === ChannelType.GROUP_DM; } + isThread() { + return this.type === ChannelType.GUILD_NEWS_THREAD || this.type === ChannelType.GUILD_PUBLIC_THREAD || this.type === ChannelType.GUILD_PRIVATE_THREAD; + } + + isPrivateThread() { + return this.type === ChannelType.GUILD_PRIVATE_THREAD; + } + + isPublicThread() { + return this.type === ChannelType.GUILD_NEWS_THREAD || this.type === ChannelType.GUILD_PUBLIC_THREAD; + } + // Does the channel support sending messages ( eg categories do not ) isWritable() { const disallowedChannelTypes = [ChannelType.GUILD_CATEGORY, ChannelType.GUILD_STAGE_VOICE];