aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dennis Pham <[email protected]>2020-07-23 15:17:40 -0400
committerGravatar GitHub <[email protected]>2020-07-23 15:17:40 -0400
commit5528e6df9b0a75fe7387252f61b52631e48be050 (patch)
treef7a42f23af47666db3cfa9e7f0a1bce8abf43476
parentDisabled burst_shared filter temporarily (diff)
parentMerge branch 'master' into bug/1036/empty-embed-fields (diff)
Merge pull request #1064 from python-discord/bug/1036/empty-embed-fields
Check that embed desc is not Empty before stripping.
-rw-r--r--bot/cogs/help_channels.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 0c8cbb417..e0fd06654 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -428,8 +428,11 @@ class HelpChannels(commands.Cog):
if not message or not message.embeds:
return False
- embed = message.embeds[0]
- return message.author == self.bot.user and embed.description.strip() == description.strip()
+ bot_msg_desc = message.embeds[0].description
+ if bot_msg_desc is discord.Embed.Empty:
+ log.trace("Last message was a bot embed but it was empty.")
+ return False
+ return message.author == self.bot.user and bot_msg_desc.strip() == description.strip()
@staticmethod
def is_in_category(channel: discord.TextChannel, category_id: int) -> bool: