Correct volume implementation
This commit is contained in:
parent
ead82dc4aa
commit
e7133bc25f
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue