1
0
Fork 0
mirror of synced 2024-06-03 11:14:33 +12:00

Correct volume implementation

This commit is contained in:
Phxntxm 2017-04-23 19:09:49 -05:00
parent ead82dc4aa
commit e7133bc25f

View file

@ -347,9 +347,9 @@ class Music:
"""Sets the volume of the currently playing song.""" """Sets the volume of the currently playing song."""
state = self.voice_states.get(ctx.message.guild.id) state = self.voice_states.get(ctx.message.guild.id)
if source is None: if state is None or state.voice is None:
await ctx.send("Not playing anything right now, please set volume after playing something") await ctx.send("Not playing anything right now, please set volume after playing something")
elif value is None or not state.playing: elif value is None:
volume = state.voice.source.volume volume = state.voice.source.volume
await ctx.send("Current volume is {}".format(volume)) await ctx.send("Current volume is {}".format(volume))
elif value > 200: elif value > 200: