From cc8a86a4bdc1bdb8aed00ab51b7dbf3aa589b4c5 Mon Sep 17 00:00:00 2001 From: MrKomodoDragon <74436682+MrKomodoDragon@users.noreply.github.com> Date: Sun, 23 May 2021 00:37:55 -0700 Subject: [PATCH] Improve the example for abc.Messageable.typing --- discord/abc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index 5471b336b..57d3f4c21 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)