WIP: Moderation type registry #26

Closed
cswimr wants to merge 146 commits from aurora-3rd-party into main
Showing only changes of commit 3dcc637920 - Show all commits

View file

@ -187,16 +187,17 @@ async def case_factory(interaction: Interaction, moderation: Moderation) -> Embe
embed.description += f"\n**Role:** {role.name}"
if moderation.metadata:
if moderation.metadata["imported_from"]:
del moderation.metadata["imported_from"]
if moderation.metadata.get("imported_from"):
embed.description += (
f"\n**Imported From:** {moderation.metadata['imported_from']}"
)
if moderation.metadata["imported_timestamp"]:
del moderation.metadata["imported_timestamp"]
moderation.metadata.pop("imported_from")
if moderation.metadata.get("imported_timestamp"):
embed.description += (
f"\n**Imported Timestamp:** <t:{moderation.metadata['imported_timestamp']}> | <t:{moderation.metadata['imported_timestamp']}:R>"
)
moderation.metadata.pop("imported_timestamp")
if moderation.metadata.items():
for key, value in moderation.metadata.items():
embed.description += f"\n**{key.title()}:** {value}"