mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
fix(bot): use correct channel id for log channel lookup
This commit is contained in:
parent
0b283f5631
commit
48e53e45dd
1 changed files with 2 additions and 2 deletions
|
|
@ -63,12 +63,12 @@ public class LogChannelService
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var guildId = proxiedMessage.Guild ?? trigger.GuildId.Value;
|
var guildId = proxiedMessage.Guild ?? trigger.GuildId.Value;
|
||||||
var rootChannel = await _cache.GetRootChannel(guildId, trigger.ChannelId);
|
var rootChannel = await _cache.GetRootChannel(guildId, proxiedMessage.Channel);
|
||||||
|
|
||||||
// get log channel info from the database
|
// get log channel info from the database
|
||||||
var guild = await _repo.GetGuild(guildId);
|
var guild = await _repo.GetGuild(guildId);
|
||||||
var logChannelId = guild.LogChannel;
|
var logChannelId = guild.LogChannel;
|
||||||
var isBlacklisted = guild.LogBlacklist.Any(x => x == trigger.ChannelId || x == rootChannel.Id);
|
var isBlacklisted = guild.LogBlacklist.Any(x => x == proxiedMessage.ChannelId || x == rootChannel.Id);
|
||||||
|
|
||||||
// if (ctx.SystemId == null ||
|
// if (ctx.SystemId == null ||
|
||||||
// removed the above, there shouldn't be a way to get to this code path if you don't have a system registered
|
// removed the above, there shouldn't be a way to get to this code path if you don't have a system registered
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue