I want to make a bot in which you can write a command, the bot will give you a button, you click on it, the bot asks for any number and you enter it. In short, how to enter data into the discord bot via a message
class list3(discord.ui.View):
@discord.ui.button(label=”RNG”, row=0, style=discord.ButtonStyle.gray)
async def second_button_callback(self, interaction, button):
await interaction.response.send_message(“max number”)
#some code
await interaction.response.send_message(“min number”)
#some code again
await interaction.rsponse.send_message(random.randint(min, max))
chponke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.