Fix sorted call, typo in ModcaseCog

This commit is contained in:
Zeva Rose 2022-05-03 10:07:15 -06:00
parent 1ddef9fd0a
commit 17b78e5f4e
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ class CaseCog(Cog):
action_output = tmp_output action_output = tmp_output
note_output = "" note_output = ""
for note in sorted(mod_case.notes, lambda x: x.created_at): for note in sorted(mod_case.notes, key=lambda x: x.created_at):
admin = await self.bot.fetch_user(note.admin) admin = await self.bot.fetch_user(note.admin)
admin_text = "N/A" admin_text = "N/A"
if not admin: if not admin:

View file

@ -69,7 +69,7 @@ class ModcaseCog(Cog):
except Exception: except Exception:
self.logger.debug("User not warned of action due to closed DMs") self.logger.debug("User not warned of action due to closed DMs")
modlog = await Modlog.find_onw(q(user=user.id, guild=ctx.guild.id, open=True)) modlog = await Modlog.find_one(q(user=user.id, guild=ctx.guild.id, open=True))
if modlog: if modlog:
m_action = Action(action_type=name.lower(), parent=action.id) m_action = Action(action_type=name.lower(), parent=action.id)
modlog.actions.append(m_action) modlog.actions.append(m_action)