WIP: Refactor Aurora (3.0.0) #29
1 changed files with 23 additions and 20 deletions
|
@ -96,26 +96,29 @@ class ImportAuroraView(ui.View):
|
|||
else:
|
||||
duration = None
|
||||
|
||||
Moderation.log(
|
||||
bot=interaction.client,
|
||||
guild_id=self.ctx.guild.id,
|
||||
moderator_id=case["moderator_id"],
|
||||
moderation_type=case["moderation_type"],
|
||||
target_type=case["target_type"],
|
||||
target_id=case["target_id"],
|
||||
role_id=case["role_id"],
|
||||
duration=duration,
|
||||
reason=case["reason"],
|
||||
timestamp=case["timestamp"],
|
||||
resolved=case["resolved"],
|
||||
resolved_by=case["resolved_by"],
|
||||
resolved_reason=case["resolve_reason"],
|
||||
expired=case["expired"],
|
||||
changes=changes,
|
||||
metadata=metadata,
|
||||
database=database,
|
||||
return_obj=False
|
||||
)
|
||||
try:
|
||||
Moderation.log(
|
||||
bot=interaction.client,
|
||||
guild_id=self.ctx.guild.id,
|
||||
moderator_id=case["moderator_id"],
|
||||
moderation_type=case["moderation_type"],
|
||||
target_type=case["target_type"],
|
||||
target_id=case["target_id"],
|
||||
role_id=case["role_id"],
|
||||
duration=duration,
|
||||
reason=case["reason"],
|
||||
timestamp=case["timestamp"],
|
||||
resolved=case["resolved"],
|
||||
resolved_by=case["resolved_by"],
|
||||
resolved_reason=case["resolve_reason"],
|
||||
expired=case["expired"],
|
||||
changes=changes,
|
||||
metadata=metadata,
|
||||
database=database,
|
||||
return_obj=False
|
||||
)
|
||||
except Exception as e:
|
||||
failed_cases.append(str(case["moderation_id"]) + f": {e}")
|
||||
|
||||
await interaction.edit_original_response(content="Import complete.")
|
||||
if failed_cases:
|
||||
|
|
Loading…
Reference in a new issue