#buttons not working after 3-5 min. afk.

1 messages · Page 1 of 1 (latest)

keen swift
#

When i did't use "Жалоба на пользователя" or "Жалоба на модератора" about 5 min. , button got deactivated and not working untill restarting bot

#

i thinking problem somewhere here

class Menu(disnake.ui.View):
    def __init__(self):
        super().__init__()
        self.value = None
        

    @disnake.ui.button(label="Жалоба на игрока", style=disnake.ButtonStyle.blurple)
    async def menu1(self, button = disnake.ui.Button, interaction = disnake.Interaction):
        modal = Report_user()
        await interaction.response.send_modal(modal=modal)

    @disnake.ui.button(label="Жалоба на модератора", style=disnake.ButtonStyle.red)
    async def menu2(self, button = disnake.ui.Button, interaction = disnake.Interaction):
        modal = Report_moderator()
        await interaction.response.send_modal(modal=modal)```
vale river
#

there is time out param

keen swift
#

yesss... i know

vale river
#

you need to set it to None if you don't want timeout or else value

#

you aren't setting that

keen swift
#

Where?

#

class Menu(disnake.ui.View(timeout=None)): - not working

vale river
#
class Menu(disnake.ui.View):
    def __init__(self):
        super().__init__(timeout=None)
keen swift
#

aww god

#

thx