From 32b4f4ee9d6610666da2756f2992356a884338a9 Mon Sep 17 00:00:00 2001 From: IGuessItsBray <97918955+IGuessItsBray@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:12:09 -0400 Subject: [PATCH] (fix) add private threads Co-Authored-By: spiral --- PluralKit.Bot/Commands/ServerConfig.cs | 2 +- PluralKit.Bot/Services/LogChannelService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Commands/ServerConfig.cs b/PluralKit.Bot/Commands/ServerConfig.cs index e21fd198..daadc0b2 100644 --- a/PluralKit.Bot/Commands/ServerConfig.cs +++ b/PluralKit.Bot/Commands/ServerConfig.cs @@ -46,7 +46,7 @@ public class ServerConfig var channelString = ctx.PeekArgument(); channel = await ctx.MatchChannel(); if (channel == null || channel.GuildId != ctx.Guild.Id) throw Errors.ChannelNotFound(channelString); - if (channel.Type != Channel.ChannelType.GuildText && channel.Type != Channel.ChannelType.GuildPublicThread) + if (channel.Type != Channel.ChannelType.GuildText && channel.Type != Channel.ChannelType.GuildPublicThread && channel.Type != Channel.ChannelType.GuildPrivateThread) throw new PKError("PluralKit cannot log messages to this type of channel."); var perms = await _cache.PermissionsIn(channel.Id); diff --git a/PluralKit.Bot/Services/LogChannelService.cs b/PluralKit.Bot/Services/LogChannelService.cs index 0a8c960d..337d513a 100644 --- a/PluralKit.Bot/Services/LogChannelService.cs +++ b/PluralKit.Bot/Services/LogChannelService.cs @@ -75,7 +75,7 @@ public class LogChannelService // Find log channel and check if valid var logChannel = await FindLogChannel(guildId, logChannelId.Value); - if (logChannel == null || logChannel.Type != Channel.ChannelType.GuildText && logChannel.Type != Channel.ChannelType.GuildPublicThread) return null; + if (logChannel == null || logChannel.Type != Channel.ChannelType.GuildText && logChannel.Type != Channel.ChannelType.GuildPublicThread && logChannel.Type != Channel.ChannelType.GuildPrivateThread) return null; // Check bot permissions var perms = await GetPermissionsInLogChannel(logChannel);