fix(bot): 🐛 p.skip not working.

This commit is contained in:
Nyeki.py
2024-10-18 21:00:43 -03:00
parent cb71c6bbd3
commit ec82479d0f
+14 -9
View File
@@ -327,18 +327,23 @@ class Calls(base.Cog):
channel = find(lambda c: c.id == channel_id, call.channels)
other_channel = find(lambda c: c.id != channel_id, call.channels)
other_channel.call = None
await other_channel.save()
if other_channel is not None:
other_channel.call = None
await other_channel.save()
try:
await self.bot.get_partial_messageable(other_channel.id).send(
f"☎️ {secrets.choice(constants.MSGS_PHONE_HANGUP_YOU)}"
)
except errors.DiscordException:
pass
try:
await self.bot.get_partial_messageable(other_channel.id).send(
f"☎️ {secrets.choice(constants.MSGS_PHONE_HANGUP_YOU)}"
)
except errors.DiscordException:
pass
await redis.srem(
constants.CHANNELS_ONCALL_SET, str(channel_id), str(other_channel.id)
constants.CHANNELS_ONCALL_SET,
*(
[str(channel_id)]
+ ([str(other_channel.id)] if other_channel is not None else [])
),
)
last_channel_calls = [