mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-10 07:49:48 +00:00
Update voice channel if we move to different channels.
This commit is contained in:
parent
a82176120c
commit
8de55fa203
@ -340,10 +340,14 @@ class Client:
|
|||||||
if event == 'VOICE_STATE_UPDATE':
|
if event == 'VOICE_STATE_UPDATE':
|
||||||
user_id = data.get('user_id')
|
user_id = data.get('user_id')
|
||||||
if user_id == self.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')
|
self.session_id = data.get('session_id')
|
||||||
log.debug('Session ID found: {}'.format(self.session_id))
|
log.debug('Session ID found: {}'.format(self.session_id))
|
||||||
self._session_id_found.set()
|
self._session_id_found.set()
|
||||||
|
|
||||||
|
|
||||||
if event == 'VOICE_SERVER_UPDATE':
|
if event == 'VOICE_SERVER_UPDATE':
|
||||||
self._voice_data_found.data = data
|
self._voice_data_found.data = data
|
||||||
log.debug('Voice connection data found: {}'.format(data))
|
log.debug('Voice connection data found: {}'.format(data))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user