mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-31 13:32:57 +00:00 
			
		
		
		
	Improve the example for abc.Messageable.typing
This commit is contained in:
		| @@ -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) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user