1
0
Fork 0
mirror of synced 2024-06-23 08:40:41 +12:00

Stopped the player from resetting volume upon playing the next song

This commit is contained in:
phxntxm 2016-08-31 11:58:59 -05:00
parent ffbd1ee431
commit 98d56f9b69

View file

@ -73,6 +73,7 @@ class VoiceState:
'default_search': 'auto',
'quiet': True
}
self.volume = 50
def is_playing(self):
# If our VoiceClient or current VoiceEntry do not exist, then we are not playing a song
@ -123,6 +124,7 @@ class VoiceState:
after=self.toggle_next)
# Now we can start actually playing the song
self.current.player.start()
self.current.player.volume = self.volume / 100
# Wait till the Event has been set, before doing our task again
await self.play_next_song.wait()
@ -309,6 +311,7 @@ class Music:
if value > 200:
await self.bot.say("Sorry but the max volume is 200")
return
state.volume = value
if state.is_playing():
player = state.player
player.volume = value / 100