diff options
author | 2022-09-18 17:55:59 +0100 | |
---|---|---|
committer | 2022-09-18 17:55:59 +0100 | |
commit | cee57978ed2e1a5eee126a076500da5a9bf80ed8 (patch) | |
tree | f42f49b83d0baf3ec7d7b7d9fac84486a8080552 | |
parent | Merge pull request #2241 from python-discord/disable-pytest-nose-plugin (diff) | |
parent | Merge branch 'main' into fix-ensure-cached-claimant-none-check (diff) |
Merge pull request #2273 from python-discord/fix-ensure-cached-claimant-none-check
-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 |