#🔒 When I press the button nothing happens
26 messages · Page 1 of 1 (latest)
@shy dew
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Error
TypeError: AcceptButton.embed_button() takes 2 positional arguments but 3 were given
where ur calling ur embed_button method ur passing 3 arguments instead of only 2
https://discordpy.readthedocs.io/en/stable/interactions/api.html?highlight=button#discord.ui.button
The function being decorated should have three parameters, self representing the discord.ui.View, the discord.Interaction you receive and the discord.ui.Button being pressed.
You need to add another argument to your method to get the button being pressed
I dont call it anywhere. I use it for view
In channel.send()
wherever you "use" it, you're passing 3 arguments which is causing the error
In view i don't give any arguments
can you send the view function assuming you wrote it
wait nvm
ah i see
eagle mentioned the problem i skipped over it
you need to add another parameter to the embed_button method
I can make any parameter?
Yes! Its works!
nice
!close
!close
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.