diff options
| author | khazhyk <[email protected]> | 2019-04-07 21:47:59 -0700 |
|---|---|---|
| committer | khazhyk <[email protected]> | 2019-04-07 22:46:40 -0700 |
| commit | 366dc4855b16422df0d22549820a5d5b87ef3c08 (patch) | |
| tree | 8cbd794830d03a197cbd65ab5fc009b7f58f1c42 /discord/utils.py | |
| parent | allow passing 0 for logs_from parameters (diff) | |
| download | discord.py-366dc4855b16422df0d22549820a5d5b87ef3c08.tar.xz discord.py-366dc4855b16422df0d22549820a5d5b87ef3c08.zip | |
simplify HistoryIterator message ordering
rename reverse -> oldest_first, which is more obvious what it does.
Then, honor it entirely - if you specify no `after` endpoint, we default
to the beginning of message history, similar to how `before` defaults to
the end of message history.
This is a breaking change, and will change the behavior of any iterator
that previously would have been returning messages in a weird order for
limits over 100
`for msg in history(reversed=True, limit=300)` would return the newest
300 messages, in a messed up order (100..0, 200..100, 300..200).
`for msg in history(oldest_first=True, limit=300)` will now return the
oldest 300 messages in order. And so on.
`for msg in history(after=msg)` is unchanged, this previously would
return the oldest 100 messages after `msg`, oldest->newest order, and
still will.
Diffstat (limited to 'discord/utils.py')
0 files changed, 0 insertions, 0 deletions