fix(aurora): fixed a TypeError
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 41s

This commit is contained in:
Seaswimmer 2024-08-19 17:52:18 -04:00
parent edbc950741
commit 7c86d862cf
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -265,13 +265,13 @@ async def changes_factory(interaction: Interaction, moderation: Moderation) -> E
change_str = [ change_str = [
f"{bold('User:')} {inline(user.name)} ({user.id})", f"{bold('User:')} {inline(user.name)} ({user.id})",
f"{bold('Reason:')} {change.reason}" if change.reason else None, f"{bold('Reason:')} {change.reason}" if change.reason else "",
f"{bold('Duration:')} {humanize_timedelta(timedelta=change.duration)}" if change.duration else None, f"{bold('Duration:')} {humanize_timedelta(timedelta=change.duration)}" if change.duration else "",
f"{bold('End Timestamp:')} {end_timestamp}" if end_timestamp else None, f"{bold('End Timestamp:')} {end_timestamp}" if end_timestamp else "",
f"{bold('Timestamp')} {timestamp}", f"{bold('Timestamp')} {timestamp}",
] ]
for string in change_str: for string in change_str:
if string is None: if string == "":
change_str.remove(string) change_str.remove(string)
embed.add_field( embed.add_field(