Skip to content

Commit

Permalink
Fixes the role menu not timing out properly (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajax146 authored Aug 19, 2024
1 parent 2d93925 commit 5b3a792
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions techsupport_bot/ui/roleselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ 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
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()


Expand Down

0 comments on commit 5b3a792

Please sign in to comment.