From 7f0bd8c1a8f3f376c08de46aa5c9da4483ba1598 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Fri, 12 Jul 2024 16:33:00 -0400 Subject: [PATCH] fix(aurora): fixed the Moderation.update() method being broken --- aurora/models/moderation.py | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/aurora/models/moderation.py b/aurora/models/moderation.py index 471d133..b49894b 100644 --- a/aurora/models/moderation.py +++ b/aurora/models/moderation.py @@ -132,27 +132,6 @@ class Moderation(AuroraGuildModel): success, msg = await self.type.resolve_handler(moderation=self, reason=reason) - # if self.type in ["UNMUTE", "UNBAN"]: - # raise TypeError("Cannot resolve an unmute or unban case!") - - # if self.type == "MUTE": - # try: - # guild: discord.Guild = await self.bot.fetch_guild(self.guild_id) - # member = await guild.fetch_member(self.target_id) - - # await member.timeout( - # None, reason=f"Case {self.moderation_id} resolved by {resolved_by}{' for '+ reason if reason else ''}" - # ) - # except NotFound: - # pass - - # if self.type in ["BAN", "TEMPBAN"]: - # try: - # guild: discord.Guild = await self.bot.fetch_guild(self.guild_id) - # await guild.unban(await self.get_target(), reason=f"Case {self.moderation_id} resolved by {resolved_by}{' for '+ reason if reason else ''}") - # except NotFound: - # pass - if not self.changes: self.changes.append(Change.from_dict(self.bot, { "type": "ORIGINAL", @@ -178,7 +157,7 @@ class Moderation(AuroraGuildModel): await self.execute(query, ( self.timestamp.timestamp(), - self.moderation_type.moderation_type, + self.moderation_type.key, self.target_type, self.moderator_id, self.role_id, @@ -198,7 +177,7 @@ class Moderation(AuroraGuildModel): self.moderation_id, self.guild_id, self.timestamp.timestamp(), - self.moderation_type, + self.moderation_type.key, self.target_type, self.moderator_id, self.role_id,