From 5b3a79251214ea4b838e454672d1563a67fea500 Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:00:39 -0700 Subject: [PATCH] Fixes the role menu not timing out properly (#1130) --- techsupport_bot/ui/roleselect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/techsupport_bot/ui/roleselect.py b/techsupport_bot/ui/roleselect.py index c826fcb4..22cbe954 100644 --- a/techsupport_bot/ui/roleselect.py +++ b/techsupport_bot/ui/roleselect.py @@ -21,7 +21,7 @@ def __init__(self: Self, role_list: list[str]) -> None: max_values=len(role_list), options=role_list, ) - self.timeout = False + self.timeout = True async def callback(self: Self, interaction: discord.Interaction) -> None: """What happens when the select menu has been used @@ -29,12 +29,12 @@ async def callback(self: Self, interaction: discord.Interaction) -> None: Args: interaction (discord.Interaction): The interaction that called this select object """ + self.timeout = False self.view.stop() async def on_timeout(self: Self) -> None: """What happens when the view timesout. This is to prevent all roles from being removed.""" self.values = None - self.timeout = True self.view.stop()