aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMrKomodoDragon <[email protected]>2021-05-23 00:37:55 -0700
committerGitHub <[email protected]>2021-05-23 03:37:55 -0400
commitcc8a86a4bdc1bdb8aed00ab51b7dbf3aa589b4c5 (patch)
tree26f34d7bc4f963e09b463ef8183ddc84378223dd
parentConsistent loop attribute description (diff)
downloaddiscord.py-cc8a86a4bdc1bdb8aed00ab51b7dbf3aa589b4c5.tar.xz
discord.py-cc8a86a4bdc1bdb8aed00ab51b7dbf3aa589b4c5.zip
Improve the example for abc.Messageable.typing
-rw-r--r--discord/abc.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/discord/abc.py b/discord/abc.py
index 5471b336..57d3f4c2 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -1310,10 +1310,11 @@ class Messageable(Protocol):
This means that both ``with`` and ``async with`` work with this.
Example Usage: ::
+ async with channel.typing():
+ # stimulate something heavy
+ await asyncio.sleep(10)
- async with channel.typing():
- # do expensive stuff here
- await channel.send('done!')
+ await channel.send('done!')
"""
return Typing(self)