fix(bot): 🐛 Automated call hang up suddenly stopping working.

This commit is contained in:
Nyeki.py
2024-10-19 01:23:33 -03:00
parent c8d0d1271a
commit cef90677d7
+2
View File
@@ -123,6 +123,8 @@ class Calls(base.Cog):
except errors.DiscordException: except errors.DiscordException:
pass pass
hung_up_channel_ids = [id for id in hung_up_channel_ids if id is not None]
if len(hung_up_channel_ids) > 0: if len(hung_up_channel_ids) > 0:
await models.Channel.filter(id__in=hung_up_channel_ids).update(call=None) await models.Channel.filter(id__in=hung_up_channel_ids).update(call=None)
await redis.srem(constants.CHANNELS_ONCALL_SET, *hung_up_channel_ids) await redis.srem(constants.CHANNELS_ONCALL_SET, *hung_up_channel_ids)