Skip to content

Commit 3e906fe

Browse files
authored
Hide warnings on whois if there are no warnings (#870)
1 parent 12749c7 commit 3e906fe

File tree

1 file changed

+6
-5
lines changed
  • techsupport_bot/commands

1 file changed

+6
-5
lines changed

techsupport_bot/commands/who.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,12 @@ async def modify_embed_for_mods(
148148
warning_str = ""
149149
for warning in warnings:
150150
warning_str += f"{warning.reason} - {warning.time.date()}\n"
151-
embed.add_field(
152-
name="**Warnings**",
153-
value=warning_str,
154-
inline=True,
155-
)
151+
if warning_str:
152+
embed.add_field(
153+
name="**Warnings**",
154+
value=warning_str,
155+
inline=True,
156+
)
156157

157158
# If the user has a pending application, show it
158159
# If the user is banned from making applications, show it

0 commit comments

Comments
 (0)