mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Audio] Stop player before destroying on emptydisconnect (#3119)
* fix(audio): stop player before disconnect in emptydisconnect * chore(changelog): add towncrier entry
This commit is contained in:
parent
6aeca83c63
commit
19e8e60a4d
1
changelog.d/audio/3050.bugfix.rst
Normal file
1
changelog.d/audio/3050.bugfix.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Bot's status is now properly cleared on emptydisconnect.
|
||||||
@ -6740,7 +6740,9 @@ class Audio(commands.Cog):
|
|||||||
if (time.time() - stop_times[sid]) >= emptydc_timer:
|
if (time.time() - stop_times[sid]) >= emptydc_timer:
|
||||||
stop_times.pop(sid)
|
stop_times.pop(sid)
|
||||||
try:
|
try:
|
||||||
await lavalink.get_player(sid).disconnect()
|
player = lavalink.get_player(sid)
|
||||||
|
await player.stop()
|
||||||
|
await player.disconnect()
|
||||||
except Exception:
|
except Exception:
|
||||||
log.error("Exception raised in Audio's emptydc_timer.", exc_info=True)
|
log.error("Exception raised in Audio's emptydc_timer.", exc_info=True)
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user