How do i use bot.wait_for for button_clicked and how do i get interaction id?
And if view is running in two guilds at same time will it be different or same? Because i want to run some function on it so it might get called for another guild
How do i use bot.wait_for for button_clicked and how do i get interaction id?
And if view is running in two guilds at same time will it be different or same? Because i want to run some function on it so it might get called for another guild
Copyright © 2021 Jogjafile Inc.
button_clickedevent forbot.wait_forwas only fordiscord-components, which is outdated and should not be used.The best solution is to use the
button.callbackfunction.The
wait_forfunction waits for an event to happen, in this case,button_clickeddoes not exist within Discord.py and was indiscord-components.This code gives a basic representation of how a button works in Discord.py.
For more information, discord.ui.View, discord.ui.Button.