Added an additional step, to ensure a state's entries are cleared even if it doesn't exist. Lol just that comment shows how shitty discord's voice is.
This commit is contained in:
parent
2e4f006f5f
commit
dd3194c314
1 changed files with 3 additions and 2 deletions
|
@ -525,8 +525,9 @@ class Music:
|
||||||
|
|
||||||
# Stop playing whatever song is playing.
|
# Stop playing whatever song is playing.
|
||||||
if state.is_playing():
|
if state.is_playing():
|
||||||
player = state.player
|
state.player.stop()
|
||||||
player.stop()
|
|
||||||
|
state.songs.clear()
|
||||||
|
|
||||||
# This will stop cancel the audio event we're using to loop through the queue
|
# This will stop cancel the audio event we're using to loop through the queue
|
||||||
# Then erase the voice_state entirely, and disconnect from the channel
|
# Then erase the voice_state entirely, and disconnect from the channel
|
||||||
|
|
Loading…
Reference in a new issue