aboutsummaryrefslogtreecommitdiff
path: root/discord/ui
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-05-31 00:12:08 -0400
committerRapptz <[email protected]>2021-05-31 00:12:08 -0400
commit2ed3e049e1f36a30024fbed0a2ae2a75878d0b96 (patch)
tree7d28e2ac6edafccbdc0314b56c05eb27368b2114 /discord/ui
parentSync views in InteractionResponse.edit_message (diff)
downloaddiscord.py-2ed3e049e1f36a30024fbed0a2ae2a75878d0b96.tar.xz
discord.py-2ed3e049e1f36a30024fbed0a2ae2a75878d0b96.zip
Add View.is_finished() to query listening state
Diffstat (limited to 'discord/ui')
-rw-r--r--discord/ui/view.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/ui/view.py b/discord/ui/view.py
index 55806830..13016a8e 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.