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

Added the ability to check the current volume

This commit is contained in:
Phxntxm 2016-10-01 20:38:14 -05:00
parent f4267ef84a
commit 5c1773fddd

View file

@ -324,10 +324,14 @@ class Music:
@commands.command(pass_context=True, no_pm=True)
@checks.custom_perms(kick_members=True)
async def volume(self, ctx, value: int):
async def volume(self, ctx, value: int=None):
"""Sets the volume of the currently playing song."""
state = self.get_voice_state(ctx.message.server)
if value is None:
volume = state.volume
await self.bot.say("Current volume is {}".format(volume))
return
if value > 200:
await self.bot.say("Sorry but the max volume is 200")
return