Allow forum posts/threads for logging

Allow server staff to set a thread or forum post as the home for logs

Co-Authored-By: spiral <spiral@spiral.sh>
This commit is contained in:
IGuessItsBray 2023-03-23 12:52:23 -04:00
parent 89e287bc52
commit 948aa19f6e

View file

@ -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) return null;
if (logChannel == null || logChannel.Type != Channel.ChannelType.GuildText || Channel.ChannelType.GuildPublicThread || Channel.ChannelType.GuildPrivateThread) return null;
// Check bot permissions
var perms = await GetPermissionsInLogChannel(logChannel);