mirror of https://gitlab.com/litecord/litecord.git
gateway.websocket, voice.manager: quickfixes
This commit is contained in:
parent
3a6073468e
commit
307feacc78
|
|
@ -637,12 +637,12 @@ class GatewayWebsocket:
|
||||||
# if its null and null, disconnect the user from any voice
|
# if its null and null, disconnect the user from any voice
|
||||||
# TODO: maybe just leave from DMs? idk...
|
# TODO: maybe just leave from DMs? idk...
|
||||||
if channel_id is None and guild_id is None:
|
if channel_id is None and guild_id is None:
|
||||||
await self.ext.voice.leave_all(self.state.user_id)
|
return await self.ext.voice.leave_all(self.state.user_id)
|
||||||
|
|
||||||
# if guild is not none but channel is, we are leaving
|
# if guild is not none but channel is, we are leaving
|
||||||
# a guild's channel
|
# a guild's channel
|
||||||
if channel_id is None:
|
if channel_id is None:
|
||||||
await self.ext.voice.leave(guild_id, self.state.user_id)
|
return await self.ext.voice.leave(guild_id, self.state.user_id)
|
||||||
|
|
||||||
# fetch an existing state given user and guild OR user and channel
|
# fetch an existing state given user and guild OR user and channel
|
||||||
chan_type = ChannelType(
|
chan_type = ChannelType(
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ class VoiceManager:
|
||||||
# a list of tasks to run that actually do the deletion by themselves
|
# a list of tasks to run that actually do the deletion by themselves
|
||||||
# instead of us generating a delete. then only start running them later
|
# instead of us generating a delete. then only start running them later
|
||||||
# on.
|
# on.
|
||||||
for sec_key_id, states in dict(self.states):
|
for sec_key_id, states in dict(self.states).items():
|
||||||
for state in states:
|
for state in states:
|
||||||
if state.user_id != user_id:
|
if state.user_id != user_id:
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue