WIP: Moderation type registry #26

Closed
cswimr wants to merge 146 commits from aurora-3rd-party into main
2 changed files with 5 additions and 0 deletions
Showing only changes of commit 9a4f19f4a1 - Show all commits

View file

@ -1002,6 +1002,7 @@ class Aurora(commands.Cog):
None,
None,
reason,
metadata={"interval": interval}
)
await interaction.edit_original_response(content=f"Slowmode in {channel.mention} has been set to {interval} seconds! (Case `#{moderation.id:,}`)\n**Reason** - `{reason}`")
await log(interaction, moderation.id)

View file

@ -188,13 +188,17 @@ async def case_factory(interaction: Interaction, moderation: Moderation) -> Embe
if moderation.metadata:
if moderation.metadata["imported_from"]:
del moderation.metadata["imported_from"]
embed.description += (
f"\n**Imported From:** {moderation.metadata['imported_from']}"
)
if moderation.metadata["imported_timestamp"]:
del moderation.metadata["imported_timestamp"]
embed.description += (
f"\n**Imported Timestamp:** <t:{moderation.metadata['imported_timestamp']}> | <t:{moderation.metadata['imported_timestamp']}:R>"
)
for key, value in moderation.metadata.items():
embed.description += f"\n**{key.title()}:** {value}"
embed.add_field(name="Reason", value=box(moderation.reason), inline=False)