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,