fix(bot): 🐛 p.skip not working.
This commit is contained in:
@@ -327,18 +327,23 @@ class Calls(base.Cog):
|
|||||||
channel = find(lambda c: c.id == channel_id, call.channels)
|
channel = find(lambda c: c.id == channel_id, call.channels)
|
||||||
other_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
|
if other_channel is not None:
|
||||||
await other_channel.save()
|
other_channel.call = None
|
||||||
|
await other_channel.save()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self.bot.get_partial_messageable(other_channel.id).send(
|
await self.bot.get_partial_messageable(other_channel.id).send(
|
||||||
f"☎️ {secrets.choice(constants.MSGS_PHONE_HANGUP_YOU)}"
|
f"☎️ {secrets.choice(constants.MSGS_PHONE_HANGUP_YOU)}"
|
||||||
)
|
)
|
||||||
except errors.DiscordException:
|
except errors.DiscordException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
await redis.srem(
|
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 = [
|
last_channel_calls = [
|
||||||
|
|||||||
Reference in New Issue
Block a user