mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-06 11:57:17 +00:00
parent
436d10ef39
commit
61464194be
@ -2314,6 +2314,9 @@ class Client:
|
|||||||
if self.is_voice_connected():
|
if self.is_voice_connected():
|
||||||
raise ClientException('Already connected to a voice channel')
|
raise ClientException('Already connected to a voice channel')
|
||||||
|
|
||||||
|
if isinstance(channel, Object):
|
||||||
|
channel = self.get_channel(channel.id)
|
||||||
|
|
||||||
if getattr(channel, 'type', ChannelType.text) != ChannelType.voice:
|
if getattr(channel, 'type', ChannelType.text) != ChannelType.voice:
|
||||||
raise InvalidArgument('Channel passed must be a voice channel')
|
raise InvalidArgument('Channel passed must be a voice channel')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user