C
C
c_2102021-10-27 21:11:26
Python
c_210, 2021-10-27 21:11:26

How to monitor button click in discord.py?

There is an embed, there is a button on it, how to make it so that when you click on this button, the bot does something. There is a bot.event on_button_click(), but I can't do

it.

@bot.event
async def on_button_click(interaction):
  if component.id == 'get_role':
    print("asd")

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question