diff options
author | 2021-12-05 11:50:37 +0100 | |
---|---|---|
committer | 2021-12-05 11:50:37 +0100 | |
commit | 423e8eefa7c6f1b57022edf814b082b68761777a (patch) | |
tree | d021e0247f5478a97bb5f7b7dd4b4044aed25e7c | |
parent | Merge pull request #1991 from python-discord/pep-main (diff) | |
parent | Attepmt to fetch un-cached nomination threads on archive (diff) |
Merge pull request #1993 from python-discord/fetch-thread-if-not-in-cache
Attempt to fetch un-cached nomination threads on archive
-rw-r--r-- | bot/exts/recruitment/talentpool/_review.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/exts/recruitment/talentpool/_review.py b/bot/exts/recruitment/talentpool/_review.py index f6b81ae50..0e7194892 100644 --- a/bot/exts/recruitment/talentpool/_review.py +++ b/bot/exts/recruitment/talentpool/_review.py @@ -217,8 +217,11 @@ class Reviewer: # Thread channel IDs are the same as the message ID of the parent message. nomination_thread = message.guild.get_thread(message.id) if not nomination_thread: - log.warning(f"Could not find a thread linked to {message.channel.id}-{message.id}") - return + try: + nomination_thread = await message.guild.fetch_channel(message.id) + except NotFound: + log.warning(f"Could not find a thread linked to {message.channel.id}-{message.id}") + return for message_ in messages: with contextlib.suppress(NotFound): |