Skip to content

Commit

Permalink
Fix to player.channel_id returning str instead of int
Browse files Browse the repository at this point in the history
Bump version (0, 6, 2)
  • Loading branch information
EvieePy committed May 2, 2020
1 parent 8cb1eaa commit dc67631
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wavelink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__author__ = 'EvieePy'
__license__ = 'MIT'
__copyright__ = 'Copyright 2019-2020 (c) PythonistaGuild'
__version__ = '0.6.1'
__version__ = '0.6.2'

from .client import Client
from .errors import *
Expand Down
5 changes: 3 additions & 2 deletions wavelink/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,13 @@ async def _voice_state_update(self, data) -> None:
'sessionId': data['session_id']
})

self.channel_id = data['channel_id']
channel_id = data['channel_id']

if not self.channel_id: # We're disconnecting
if not channel_id: # We're disconnecting
self._voice_state.clear()
return

self.channel_id = int(channel_id)
await self._dispatch_voice_update()

async def _dispatch_voice_update(self) -> None:
Expand Down

0 comments on commit dc67631

Please sign in to comment.