Skip to content

Commit 844f158

Browse files
committed
better logic in handling dead threads
1 parent 675cecf commit 844f158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ async def find(
657657

658658
try:
659659
thread = self.cache[recipient_id]
660-
if not self.bot.get_channel(thread.channel.id): # deleted channel
660+
if not thread.channel or not self.bot.get_channel(thread.channel.id):
661661
self.bot.loop.create_task(
662662
thread.close(
663663
closer=self.bot.user, silent=True, delete_channel=False

0 commit comments

Comments
 (0)