Browse Source

Remove Client.voice_channel

pull/74/head
Rapptz 9 years ago
parent
commit
ae0cce26ee
  1. 7
      discord/client.py

7
discord/client.py

@ -2320,14 +2320,13 @@ class Client:
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')
self.voice_channel = channel
log.info('attempting to join voice channel {0.name}'.format(channel)) log.info('attempting to join voice channel {0.name}'.format(channel))
payload = { payload = {
'op': 4, 'op': 4,
'd': { 'd': {
'guild_id': self.voice_channel.server.id, 'guild_id': channel.server.id,
'channel_id': self.voice_channel.id, 'channel_id': channel.id,
'self_mute': False, 'self_mute': False,
'self_deaf': False 'self_deaf': False
} }
@ -2342,7 +2341,7 @@ class Client:
kwargs = { kwargs = {
'user': self.user, 'user': self.user,
'channel': self.voice_channel, 'channel': channel,
'data': self._voice_data_found.data, 'data': self._voice_data_found.data,
'loop': self.loop, 'loop': self.loop,
'session_id': self.session_id, 'session_id': self.session_id,

Loading…
Cancel
Save