diff options
author | 2022-09-10 14:43:42 +0100 | |
---|---|---|
committer | 2022-09-10 14:43:42 +0100 | |
commit | 3fa905b14a8ac8e23159d487b2046d7ca62c7afb (patch) | |
tree | d0449e6323010c39528a6ea9158290292d18c165 | |
parent | Merge pull request #2234 from python-discord/infraction-durations (diff) |
Fix error in help channels cog which assumed an embed would have a description
-rw-r--r-- | bot/exts/help_channels/_channel.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py index d9cebf215..cfe774f4c 100644 --- a/bot/exts/help_channels/_channel.py +++ b/bot/exts/help_channels/_channel.py @@ -183,7 +183,8 @@ async def ensure_cached_claimant(channel: discord.TextChannel) -> None: log.info("Hit the dormant message embed before finding a claimant in %s (%d).", channel, channel.id) break # Only set the claimant if the first embed matches the claimed channel embed regex - if match := CLAIMED_BY_RE.match(message.embeds[0].description): + description = message.embeds[0].description + if (description is not None) and (match := CLAIMED_BY_RE.match(description)): await _caches.claimants.set(channel.id, int(match.group("user_id"))) return |