#Buttton

1 messages · Page 1 of 1 (latest)

final kernel
#

Yo
I have button and it work 3 minutets
and tthen when i click it
it says that application don respond
how can i fix this

vocal hawk
#
discord.ui.View(timeout=None)
final kernel
#

Wtf

#

aim i stupid

#
class View(discord.ui.View):
    @discord.ui.button(label='✅', style=discord.ButtonStyle.green)
    async def button_callback(self, button, interaction):
        role = bot.get_guild(interaction.guild_id).get_role(1007405357880062012)
        await interaction.user.add_roles(role)
        await interaction.response.send_message(content=f'<@{str(interaction.user.id)}>', embed=discord.Embed(title='Gratulacje!', description='Zweryfikowałeś się!', color=0x55FF55,  ephemeral=True).set_footer(text=strftime('%d/%m/%Y')), delete_after=2.5)```
#

where

#

i need to paste it

#

@vocal hawk

vocal hawk
#
class View(discord.ui.View):
    def __init__(self):
        super().__init__(timeout=None)
    ...
final kernel
#

any importts?

vocal hawk
#

no

final kernel
#

ok

#

im

#

totally

#

stupid

vocal hawk
final kernel
#

Please

#

can

final kernel
#

im really stupid

#

oooh

#

ok

#

im

#

really sorry

#

im sooo stopid