mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-13 18:33:26 +00:00
Fix views not being removed upon timeout
This commit is contained in:
1 parent
4fa2a6e63e
commit
c22f058fa0
1 file changed
+4
@@ -376,6 +376,10 @@ class View:
|
||||
if self.__stopped.done():
|
||||
return
|
||||
|
||||
if self.__cancel_callback:
|
||||
self.__cancel_callback(self)
|
||||
self.__cancel_callback = None
|
||||
|
||||
self.__stopped.set_result(True)
|
||||
asyncio.create_task(self.on_timeout(), name=f'discord-ui-view-timeout-{self.id}')
|
||||
|
||||
|
||||
Reference in new issue
Block a user