WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic 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,
None, None,
reason, 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 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) 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:
if moderation.metadata["imported_from"]: if moderation.metadata["imported_from"]:
del moderation.metadata["imported_from"]
embed.description += ( embed.description += (
f"\n**Imported From:** {moderation.metadata['imported_from']}" f"\n**Imported From:** {moderation.metadata['imported_from']}"
) )
if moderation.metadata["imported_timestamp"]: if moderation.metadata["imported_timestamp"]:
del moderation.metadata["imported_timestamp"]
embed.description += ( embed.description += (
f"\n**Imported Timestamp:** <t:{moderation.metadata['imported_timestamp']}> | <t:{moderation.metadata['imported_timestamp']}:R>" 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) embed.add_field(name="Reason", value=box(moderation.reason), inline=False)