File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2963,7 +2963,7 @@ async def connect(
29632963 connectable = _channel or self
29642964 channel = await connectable ._get_channel ()
29652965
2966- if state ._get_voice_client ( key_id ):
2966+ if state ._has_voice_client ( ):
29672967 raise ClientException ('Already connected to a voice channel' )
29682968
29692969 voice : T = cls (state .client , channel )
Original file line number Diff line number Diff line change @@ -1273,6 +1273,9 @@ def _update_voice_state(
12731273 def _voice_state_for (self , user_id : int ) -> Optional [VoiceState ]:
12741274 return self ._voice_states .get (user_id )
12751275
1276+ def _has_voice_client (self ) -> bool :
1277+ return bool (self ._voice_clients )
1278+
12761279 def _get_voice_client (self , guild_id : Optional [int ]) -> Optional [VoiceProtocol ]:
12771280 # The keys of self._voice_clients are ints
12781281 return self ._voice_clients .get (guild_id ) # type: ignore
You can’t perform that action at this time.
0 commit comments