From 3fa905b14a8ac8e23159d487b2046d7ca62c7afb Mon Sep 17 00:00:00 2001 From: wookie184 Date: Sat, 10 Sep 2022 14:43:42 +0100 Subject: Fix error in help channels cog which assumed an embed would have a description --- bot/exts/help_channels/_channel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3