fix(bot): 🐛 Fix "None" when bans don't have a banner in p.user.

This commit is contained in:
Nyeki.py
2024-11-03 00:41:44 -03:00
parent 5566779d4e
commit 9765e4c71c
+1 -1
View File
@@ -398,7 +398,7 @@ class Mods(base.Cog):
value=fmt.trim(
"\n".join(
[
f"- `ID: {ban.id}`{f" (by <@{ban.banned_by_id}>)" if ban.banned_by_id else None}: {ban.reason if ban.reason else "*No reason*"}. Banned {f"until <t:{int(ban.expires_at.timestamp())}:R>" if ban.expires_at is not None else "permanently"}."
f"- `ID: {ban.id}`{f" (by <@{ban.banned_by_id}>)" if ban.banned_by_id else ""}: {ban.reason if ban.reason else "*No reason*"}. Banned {f"until <t:{int(ban.expires_at.timestamp())}:R>" if ban.expires_at is not None else "permanently"}."
for ban in ongoing_bans
]
),