fix(aurora): add moderation metadata to the log factory
All checks were successful
Actions / Build Documentation (MkDocs) (pull_request) Successful in 26s
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 38s

This commit is contained in:
Seaswimmer 2024-05-24 04:18:17 -04:00
parent 7f71ca3d6d
commit bfb4d8768d
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -127,6 +127,10 @@ async def log_factory(
+ f"\n**Duration:** {duration_embed}\n**Expired:** {moderation.expired}" + f"\n**Duration:** {duration_embed}\n**Expired:** {moderation.expired}"
) )
if moderation.metadata.items():
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)
embed.add_field( embed.add_field(
@ -148,6 +152,10 @@ async def log_factory(
+ f"\n**Duration:** {humanize_timedelta(timedelta=moderation.duration)} | <t:{moderation.unix_timestamp}:R>" + f"\n**Duration:** {humanize_timedelta(timedelta=moderation.duration)} | <t:{moderation.unix_timestamp}:R>"
) )
if moderation.metadata.items():
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)
return embed return embed