Fix permission check for log channels

This commit is contained in:
Ske 2020-11-08 18:52:50 +01:00
parent 20ca37938c
commit 537783dd96

View File

@ -35,7 +35,7 @@ namespace PluralKit.Bot {
if (logChannel == null || logChannel.Type != ChannelType.Text) return; if (logChannel == null || logChannel.Type != ChannelType.Text) return;
// Check bot permissions // Check bot permissions
if (!trigger.Channel.BotHasAllPermissions(Permissions.SendMessages | Permissions.EmbedLinks)) if (!logChannel.BotHasAllPermissions(Permissions.SendMessages | Permissions.EmbedLinks))
{ {
_logger.Information( _logger.Information(
"Does not have permission to proxy log, ignoring (channel: {ChannelId}, guild: {GuildId}, bot permissions: {BotPermissions})", "Does not have permission to proxy log, ignoring (channel: {ChannelId}, guild: {GuildId}, bot permissions: {BotPermissions})",