diff options
| author | Rapptz <[email protected]> | 2016-01-17 18:34:40 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-01-17 18:34:40 -0500 |
| commit | 8de55fa203527aaa8e19a173c91f0299e33eb242 (patch) | |
| tree | 7a8e76dd81e37d6eedeba4bb2de124019ebc1cfa | |
| parent | [commands] help command now uses the full name in the signature. (diff) | |
| download | discord.py-8de55fa203527aaa8e19a173c91f0299e33eb242.tar.xz discord.py-8de55fa203527aaa8e19a173c91f0299e33eb242.zip | |
Update voice channel if we move to different channels.
| -rw-r--r-- | discord/client.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index b60e38d2..1b20f5fe 100644 --- a/discord/client.py +++ b/discord/client.py @@ -340,10 +340,14 @@ class Client: if event == 'VOICE_STATE_UPDATE': user_id = data.get('user_id') if user_id == self.user.id: + if self.is_voice_connected(): + self.voice.channel = self.get_channel(data.get('channel_id')) + self.session_id = data.get('session_id') log.debug('Session ID found: {}'.format(self.session_id)) self._session_id_found.set() + if event == 'VOICE_SERVER_UPDATE': self._voice_data_found.data = data log.debug('Voice connection data found: {}'.format(data)) |