Add documentation examples for AsyncIterator and change_presence.

This commit is contained in:
Gorialis
2017-08-02 08:10:28 +09:00
committed by Rapptz
parent 20fae90a08
commit 1582116b72
3 changed files with 33 additions and 2 deletions

View File

@ -335,7 +335,6 @@ class GuildChannel:
- Guild roles
- Channel overrides
- Member overrides
- Whether the channel is the default channel.
Parameters
----------
@ -764,7 +763,7 @@ class Messageable(metaclass=abc.ABCMeta):
Example Usage: ::
with channel.typing():
async with channel.typing():
# do expensive stuff here
await channel.send('done!')

View File

@ -753,6 +753,11 @@ class Client:
The game parameter is a Game object (not a string) that represents
a game being played currently.
Example: ::
game = discord.Game(name="with the API")
await client.change_presence(status=discord.Status.idle, game=game)
Parameters
----------
game: Optional[:class:`Game`]