diff options
| author | 2020-09-12 01:30:50 +0200 | |
|---|---|---|
| committer | 2020-09-12 01:30:50 +0200 | |
| commit | d75e1bc101578d3ce318ab0614aa448053daba7d (patch) | |
| tree | 5d42ff5bed35064655cb4dfd39a6f56c1db6b196 | |
| parent | Make nomination reason optional. (diff) | |
Only show reason if it exist.
Reduce the footer to not include reason if it does not exist.
| -rw-r--r-- | bot/cogs/watchchannels/watchchannel.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/cogs/watchchannels/watchchannel.py b/bot/cogs/watchchannels/watchchannel.py index a58b604c0..eb6d6f992 100644 --- a/bot/cogs/watchchannels/watchchannel.py +++ b/bot/cogs/watchchannels/watchchannel.py @@ -285,7 +285,10 @@ class WatchChannel(metaclass=CogABCMeta): else: message_jump = f"in [#{msg.channel.name}]({msg.jump_url})" - footer = f"Added {time_delta} by {actor} | Reason: {reason}" + # Add reason to the footer if it exists. + footer = f"Added {time_delta} by {actor}" + if reason: + footer += f" | Reason: {reason}" embed = Embed(description=f"{msg.author.mention} {message_jump}") embed.set_footer(text=textwrap.shorten(footer, width=128, placeholder="...")) |