PythonistaGuild / Wavelink

A powerful Lavalink library for Discord.py.
https://wavelink.dev
MIT License
392 stars 179 forks source link

player.volume is 0 if you didn't call set_volume #182

Closed timelessnesses closed 2 years ago

timelessnesses commented 2 years ago

player.volume will always returns 0 instead of actual current lavalink volume if you didn't call set_volume

chillymosh commented 2 years ago

Using master I restarted my bot and simply ran the below to get 100 sent back. This is before using set_volume.

    @commands.command()
    async def checkvolume(self, ctx: commands.Context):
        vc: wavelink.Player = ctx.voice_client
        await ctx.send(vc.volume)
timelessnesses commented 2 years ago

though my side doesn't work?

vc: wavelink.Player = ctx.voice_client
if volume is None:
    return await ctx.send(
        embed=discord.Embed(
            title="Volume",
            description=f"The volume is currently set to {int(vc.volume)}%.",
            color=discord.Color.green(),
            )
        )

image

timelessnesses commented 2 years ago

yeah likely my wavelink is old