From a7ddbc9b075e8a8479a4cc14bc2d250ecd6118c9 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Wed, 19 Jan 2022 18:40:14 +0000 Subject: [PATCH] don't break on channels that don't exist --- src/telephone.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/telephone.py b/src/telephone.py index f6282f3..f0b3b47 100644 --- a/src/telephone.py +++ b/src/telephone.py @@ -203,7 +203,9 @@ When you want to end a call, use hangup. chs = [] for dest in eventbus.find_all_destinations(('discord',ch.id)): if dest[0] == 'discord': - chs.append(self.bot.get_channel(dest[1])) + c = await self.bot.fetch_channel(dest[1]) + if c is not None: + chs.append(c) found = await self._find_recent(chs, query)