fix(bot): 🐛 Fix "None" when bans don't have a banner in p.user.
This commit is contained in:
@@ -398,7 +398,7 @@ class Mods(base.Cog):
|
|||||||
value=fmt.trim(
|
value=fmt.trim(
|
||||||
"\n".join(
|
"\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
|
for ban in ongoing_bans
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user