mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-09 15:29:57 +00:00
Improve the example for abc.Messageable.typing
This commit is contained in:
parent
71fe40aafa
commit
cc8a86a4bd
@ -1310,10 +1310,11 @@ class Messageable(Protocol):
|
|||||||
This means that both ``with`` and ``async with`` work with this.
|
This means that both ``with`` and ``async with`` work with this.
|
||||||
|
|
||||||
Example Usage: ::
|
Example Usage: ::
|
||||||
|
async with channel.typing():
|
||||||
|
# stimulate something heavy
|
||||||
|
await asyncio.sleep(10)
|
||||||
|
|
||||||
async with channel.typing():
|
await channel.send('done!')
|
||||||
# do expensive stuff here
|
|
||||||
await channel.send('done!')
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return Typing(self)
|
return Typing(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user