[Python] I don't get a response from the button

Discussão em 'Python' iniciado por Stack, Dezembro 9, 2024.

  1. Stack

    Stack Membro Participativo

    I want to test the Button but for some reason, it doesn't work. The Bot sends a Message with the Button but I don't get anything in the console. Can anyone say me why?

    @commands.command()
    async def butn(self, ctx):
    await ctx.send("Test", components=[
    Button(
    style = 1,
    label = "Button",
    emoji = ""
    )
    ])

    def check(res):
    return True

    while True:
    res = await self.client.wait_for("button_click", check=check)
    print(res)


    These are my Imports:

    import discord
    from discord.ext import commands
    from discord.ext.commands import has_permissions
    from discord_components import Button

    Continue reading...

Compartilhe esta Página