Skip to content

Commit

Permalink
Hide warnings on whois if there are no warnings (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajax146 authored Feb 13, 2024
1 parent 12749c7 commit 3e906fe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions techsupport_bot/commands/who.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ async def modify_embed_for_mods(
warning_str = ""
for warning in warnings:
warning_str += f"{warning.reason} - {warning.time.date()}\n"
embed.add_field(
name="**Warnings**",
value=warning_str,
inline=True,
)
if warning_str:
embed.add_field(
name="**Warnings**",
value=warning_str,
inline=True,
)

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

0 comments on commit 3e906fe

Please sign in to comment.