[Audio] Check if player.current is not None before resume (#4961)

This commit is contained in:
PredaaA
2021-05-18 22:30:42 +02:00
committed by GitHub
parent 9986cbe6b5
commit 48ed6c253e

View File

@@ -64,7 +64,7 @@ class LavalinkEvents(MixinMeta, metaclass=CompositeMetaClass):
event_channel_id = extra.get("channelID")
_error_code = extra.get("code")
if _error_code in [1000] or not guild:
if _error_code == 1000:
if _error_code == 1000 and player.current is not None and player.is_playing:
await player.resume(player.current, start=player.position, replace=False)
return
await self._ws_op_codes[guild_id].put((event_channel_id, _error_code))