diff options
| author | Rapptz <[email protected]> | 2015-12-29 12:39:58 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-29 12:39:58 -0500 |
| commit | ae0cce26eef35069dfce8e14cb49d6ddbf0e7694 (patch) | |
| tree | 1355672c86882dedaa1bc471c6c49072fb1f3c34 | |
| parent | Client.join_voice_channel now accepts an Object. (diff) | |
| download | discord.py-ae0cce26eef35069dfce8e14cb49d6ddbf0e7694.tar.xz discord.py-ae0cce26eef35069dfce8e14cb49d6ddbf0e7694.zip | |
Remove Client.voice_channel
| -rw-r--r-- | discord/client.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/discord/client.py b/discord/client.py index 10e85440..b2789b33 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2320,14 +2320,13 @@ class Client: if getattr(channel, 'type', ChannelType.text) != ChannelType.voice: raise InvalidArgument('Channel passed must be a voice channel') - self.voice_channel = channel log.info('attempting to join voice channel {0.name}'.format(channel)) payload = { 'op': 4, 'd': { - 'guild_id': self.voice_channel.server.id, - 'channel_id': self.voice_channel.id, + 'guild_id': channel.server.id, + 'channel_id': channel.id, 'self_mute': False, 'self_deaf': False } @@ -2342,7 +2341,7 @@ class Client: kwargs = { 'user': self.user, - 'channel': self.voice_channel, + 'channel': channel, 'data': self._voice_data_found.data, 'loop': self.loop, 'session_id': self.session_id, |