From 2ed3e049e1f36a30024fbed0a2ae2a75878d0b96 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 31 May 2021 00:12:08 -0400 Subject: [PATCH] Add View.is_finished() to query listening state --- discord/ui/view.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/ui/view.py b/discord/ui/view.py index 558068307..13016a8e0 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -335,6 +335,10 @@ class View: if self._cancel_callback: self._cancel_callback(self) + def is_finished(self) -> bool: + """:class:`bool`: Whether the view has finished interacting.""" + return self._stopped.done() + async def wait(self) -> bool: """Waits until the view has finished interacting.