From 366dc4855b16422df0d22549820a5d5b87ef3c08 Mon Sep 17 00:00:00 2001 From: khazhyk Date: Sun, 7 Apr 2019 21:47:59 -0700 Subject: 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. --- docs/locale/ja/LC_MESSAGES/api.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/locale/ja/LC_MESSAGES/api.po b/docs/locale/ja/LC_MESSAGES/api.po index c947dbda..f381f28d 100644 --- a/docs/locale/ja/LC_MESSAGES/api.po +++ b/docs/locale/ja/LC_MESSAGES/api.po @@ -7361,8 +7361,8 @@ msgid "Same as ``around`` in :meth:`history`." msgstr ":meth:`history` での ``around`` と同じです。" #: discord.TextChannel.purge:25 of -msgid "Same as ``reverse`` in :meth:`history`." -msgstr ":meth:`history` での ``reverse`` と同じです。" +msgid "Same as ``oldest_first`` in :meth:`history`." +msgstr ":meth:`history` での ``oldest_first`` と同じです。" #: discord.TextChannel.purge:26 of msgid "If True, use bulk delete. bulk=False is useful for mass-deleting a bot's own messages without manage_messages. When True, will fall back to single delete if current account is a user bot, or if messages are older than two weeks." -- cgit v1.2.3