Added a check in case the volume passed is higher than max
This commit is contained in:
parent
e101ba3120
commit
ceddb2b7c8
|
@ -303,6 +303,9 @@ class Music:
|
|||
"""Sets the volume of the currently playing song."""
|
||||
|
||||
state = self.get_voice_state(ctx.message.server)
|
||||
if value > 200:
|
||||
await self.bot.say("Sorry but the max volume is 200")
|
||||
return
|
||||
if state.is_playing():
|
||||
player = state.player
|
||||
player.volume = value / 100
|
||||
|
|
Loading…
Reference in a new issue