mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Audio] Check if player.current is not None before resume (#4961)
This commit is contained in:
parent
9986cbe6b5
commit
48ed6c253e
@ -64,7 +64,7 @@ class LavalinkEvents(MixinMeta, metaclass=CompositeMetaClass):
|
|||||||
event_channel_id = extra.get("channelID")
|
event_channel_id = extra.get("channelID")
|
||||||
_error_code = extra.get("code")
|
_error_code = extra.get("code")
|
||||||
if _error_code in [1000] or not guild:
|
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)
|
await player.resume(player.current, start=player.position, replace=False)
|
||||||
return
|
return
|
||||||
await self._ws_op_codes[guild_id].put((event_channel_id, _error_code))
|
await self._ws_op_codes[guild_id].put((event_channel_id, _error_code))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user