fix(aurora): fixed the Moderation.update() method being broken
This commit is contained in:
parent
6edda87baa
commit
7f0bd8c1a8
1 changed files with 2 additions and 23 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue