diff options
| author | Rapptz <[email protected]> | 2017-06-29 20:25:19 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-06-29 20:25:40 -0400 |
| commit | 51429f98e8ee2de7fb38e747810d8906acf56c49 (patch) | |
| tree | ad21c8852bdccda7dcb8ee92ab192ff04b522b6b /docs | |
| parent | Allow TextChannel.delete_messages to take lists of 0 or 1 element. (diff) | |
| download | discord.py-51429f98e8ee2de7fb38e747810d8906acf56c49.tar.xz discord.py-51429f98e8ee2de7fb38e747810d8906acf56c49.zip | |
Fix typo in migrating page.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/migrating.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/migrating.rst b/docs/migrating.rst index 7392844e..16048faf 100644 --- a/docs/migrating.rst +++ b/docs/migrating.rst @@ -430,14 +430,14 @@ In v1.0, this change has been reverted and will now return a singular type meeti This allows you to iterate over it like normal in Python 3.5+: :: - async for msg in channel.history(): - print(msg) + async for message in channel.history(): + print(message) Or turn it into a list for either Python 3.4 or 3.5+: :: - messages = yield from channel.history().flatten() + messages = await channel.history().flatten() # use yield from for 3.4! for message in messages: - print(messages) + print(message) A handy aspect of returning :class:`AsyncIterator` is that it allows you to chain functions together such as :meth:`AsyncIterator.map` or :meth:`AsyncIterator.filter`: :: |