Browse Source

Improve the example for abc.Messageable.typing

pull/6948/head
MrKomodoDragon 4 years ago
committed by GitHub
parent
commit
cc8a86a4bd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      discord/abc.py

7
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)

Loading…
Cancel
Save