1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-10 07:49:48 +00:00

Fix views not being removed upon timeout

This commit is contained in:
Rapptz 2022-02-17 07:35:12 -05:00
parent 4fa2a6e63e
commit c22f058fa0

@ -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}')