Home > Back-end >  Discord.py - Interaction with multiple buttons
Discord.py - Interaction with multiple buttons

Time:06-29

I've created a command with buttons for my Discord bot. With the current code below, the interaction with the blue button (button1) works fine. Interaction for the green button (button3) does not work.

How do I create different interactions for different buttons within the same command?

I am using discord.py and discord_components

@bot.command()
async def test(ctx):
    await ctx.send(
        "This is a button test.",
        components=[
            [
                Button( 
                    style=ButtonStyle.blue,
                    custom_id="button1",
                    label="Blue button",
                    emoji="           
  • Related