aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-09-18 17:55:59 +0100
committerGravatar GitHub <[email protected]>2022-09-18 17:55:59 +0100
commitcee57978ed2e1a5eee126a076500da5a9bf80ed8 (patch)
treef42f49b83d0baf3ec7d7b7d9fac84486a8080552
parentMerge pull request #2241 from python-discord/disable-pytest-nose-plugin (diff)
parentMerge 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.py3
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