Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

discord_components discord.py know which user clicked the button

I’m making a discord bot with discord.py, to handle the buttons I’m using discord_compontens.
I have a button and I wanna know which user clicked it, docs didn’t help me, I think this library it’s not the best choice to handle buttons, for this reason if there is a better library that can do what I want to do I can change.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You have an interaction I suppose, like this:

interaction = await self.bot.wait_for("button_click")

Then it’s enough to do:

interaction.user

To get the user that clicked the button, anyway here there is a good list of others features, like guild, etc…

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading