WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
Showing only changes of commit ec32e19b8b - Show all commits

View file

@ -48,7 +48,7 @@ class ImportAuroraView(ui.View):
if case["moderation_id"] == 0: if case["moderation_id"] == 0:
continue continue
moderation_type: Type = type_registry[str.lower(case["moderation_type"])] moderation_type: Type = type_registry[case["moderation_type"].lower()]
if "target_type" not in case or not case["target_type"]: if "target_type" not in case or not case["target_type"]:
if moderation_type.channel: if moderation_type.channel:
case["target_type"] = "channel" case["target_type"] = "channel"
@ -92,7 +92,7 @@ class ImportAuroraView(ui.View):
bot=interaction.client, bot=interaction.client,
guild_id=self.ctx.guild.id, guild_id=self.ctx.guild.id,
moderator_id=case["moderator_id"], moderator_id=case["moderator_id"],
moderation_type=moderation_type.key, moderation_type=moderation_type,
target_type=case["target_type"].lower(), target_type=case["target_type"].lower(),
target_id=case["target_id"], target_id=case["target_id"],
role_id=case["role_id"], role_id=case["role_id"],