mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Allow runtime modification of timeout expiry at runtime
This is done through setting View.timeout while it's running
This commit is contained in:
@ -88,9 +88,6 @@ class Modal(View):
|
||||
|
||||
Attributes
|
||||
------------
|
||||
timeout: Optional[:class:`float`]
|
||||
Timeout from last interaction with the UI before no longer accepting input.
|
||||
If ``None`` then there is no timeout.
|
||||
title: :class:`str`
|
||||
The title of the modal.
|
||||
children: List[:class:`Item`]
|
||||
@ -184,9 +181,7 @@ class Modal(View):
|
||||
|
||||
async def _scheduled_task(self, interaction: Interaction):
|
||||
try:
|
||||
if self.timeout:
|
||||
self.__timeout_expiry = time.monotonic() + self.timeout
|
||||
|
||||
self._refresh_timeout()
|
||||
allow = await self.interaction_check(interaction)
|
||||
if not allow:
|
||||
return
|
||||
|
Reference in New Issue
Block a user