Improve the example for abc.Messageable.typing

This commit is contained in:
MrKomodoDragon 2021-05-23 00:37:55 -07:00 committed by GitHub
parent 71fe40aafa
commit cc8a86a4bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1310,9 +1310,10 @@ class Messageable(Protocol):
This means that both ``with`` and ``async with`` work with this.
Example Usage: ::
async with channel.typing():
# do expensive stuff here
# stimulate something heavy
await asyncio.sleep(10)
await channel.send('done!')
"""