Fix channel checks missing GuildNews

The log channel / logclean checks are left as-is; hopefully nobody is
using an announcements channel for their logs?
This commit is contained in:
spiral
2021-07-08 09:17:35 -04:00
parent dd020d8aa8
commit e620e30c10
6 changed files with 9 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ namespace PluralKit.Bot
return;
var channel = _cache.GetChannel(evt.ChannelId);
if (channel.Type != Channel.ChannelType.GuildText)
if (DiscordUtils.IsValidGuildChannel(channel))
return;
var guild = _cache.GetGuild(channel.GuildId!.Value);
var lastMessage = _lastMessageCache.GetLastMessage(evt.ChannelId);

View File

@@ -66,8 +66,8 @@ namespace PluralKit.Bot
}
}
// Only proxies in guild text channels
if (channel.Type != Channel.ChannelType.GuildText) return;
// Proxied messages only exist in guild text channels, so skip checking if we're elsewhere
if (DiscordUtils.IsValidGuildChannel(channel)) return;
// Ignore reactions from bots (we can't DM them anyway)
if (user.Bot) return;