Fix breaking bug in event logging on message edits

This commit is contained in:
Zeva Rose 2022-09-17 23:53:47 +00:00
parent f50ba86c7b
commit eaa19de050

View file

@ -317,7 +317,7 @@ class MessageEventMixin:
if not after.author.bot: if not after.author.bot:
modlog = await Setting.find_one(q(guild=after.guild.id, setting="activitylog")) modlog = await Setting.find_one(q(guild=after.guild.id, setting="activitylog"))
ignore = await Setting.find_one(q(guild=after.guild.id, setting="log_ignore")) ignore = await Setting.find_one(q(guild=after.guild.id, setting="log_ignore"))
if modlog and (ignore and after.channel.id not in ignore.value): if modlog and (not ignore or (ignore and after.channel.id not in ignore.value)):
if not before or before.content == after.content or before.content is None: if not before or before.content == after.content or before.content is None:
return return
try: try: