Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: '_MissingSentinel' object has no attribute 'guild' #181

Closed
Necrosis000 opened this issue Oct 8, 2022 · 5 comments
Closed

Comments

@Necrosis000
Copy link

Necrosis000 commented Oct 8, 2022

Hi I am trying to make a setvolume command but I keep getting this error: AttributeError: '_MissingSentinel' object has no attribute 'guild'

Code:

@bot.command()
async def setVolume(ctx, *, volume: float):
    vc = ctx.voice_client
    custom_player = CustomPlayer()

    if not vc:
        await ctx.send("I ain't in a vc bro")
    else:
        await custom_player.set_volume(volume=volume)
@chillymosh
Copy link
Contributor

Which lib are you using? This usually means you are using ab unsupported fork of dpy or the old 1.7.3.

@Necrosis000
Copy link
Author

Im using Discord.py 2.0 and wavelink 1.3.3

@chillymosh
Copy link
Contributor

Volume is now back to an int in 1.3.3

I suspect it's because of your custom player class. I think you may be misunderstanding how to use the lib.
For further assistance you should join the discord and post more of your code.

@Necrosis000
Copy link
Author

Necrosis000 commented Oct 8, 2022

this is my CustomPlayer

(I also set it to int and it still didn't work)

class CustomPlayer(wavelink.Player):

    def __init__(self):
        super().__init__()
        self.queue = wavelink.queue

@chillymosh
Copy link
Contributor

Please join the Discord for further support as this is not a lib issue.

You do not need to make a custom class for this. Player already has a Queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants