Alex Nørgaard
d1dc41ec2f
Fix Client.fetch_channel not returning Thread
4 years ago
Rapptz
40127eb7b5
Fix import error with threads archived iterator
4 years ago
Rapptz
cb9a506686
Fix typo with archived_threads iterator leading to AttributeError
4 years ago
Rapptz
c1ce3b949f
Implement remaining HTTP endpoints on threads
I'm not sure if I missed any -- but this is the entire documented set
so far.
4 years ago
Nadir Chowdhury
3e92196a2b
Add typings for audit logs, integrations, and webhooks
4 years ago
Nadir Chowdhury
f8bea3bb05
Fix inaccuracies with `AsyncIterator` typings
4 years ago
Nadir Chowdhury
9f0c701a7a
use `typing.AsyncIterator` for iterators
4 years ago
James
fe54b3cb92
Flatten AsyncIterator.flatten
4 years ago
Rapptz
9d39b135f4
Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
4 years ago
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery
4 years ago
Nihaal Sangha
69bdc3a184
Change copyright year to present
4 years ago
Josh
f8e428bd5b
Add support for chunking AsyncIterator objects
4 years ago
Nadir Chowdhury
6b803acde4
[chore] Remove redundant imports
This also removes the historical patch for NullHandler implemented in bbf1c54
, as it has been available since Python 3.1.
4 years ago
Tyler North
ae1ec8072f
Fix AttributeError when fetching reactions without cache
5 years ago
Skezza
2552a268cb
Add double backticks for some parameter mentions in the documentation.
5 years ago
hamza1311
0a24e3716e
Allow HistoryIterator to take limit of 1 even when around is passed
5 years ago
Rapptz
6071607176
Bump copyright year to 2020
Closes #2510
5 years ago
Rapptz
bfaf8ecfdb
Allow Guild.fetch_members to take in limit=None
Fixes #2473
5 years ago
Rapptz
a6f61dcbde
Fix all deprecation warnings for 3.8
5 years ago
NCPlayz
851f83c821
Implement `Guild.fetch_members`
Also implements `MemberIterator`.
6 years ago
NCPlayz
3c9bcc2851
Improve documentation
6 years ago
Rapptz
14d66e7b9c
Internal consistency with message related HTTPClient methods
6 years ago
khazhyk
7845bfb79b
terminate iterators immediately once out of data
if len(data) < 100, either limit was less than 100, or we ran
out of results, in both cases, we should terminate the lookup.
This fixes, e.g., hangs in audit_logs(limit=999999), and will
reduce the number of fetch calls for any case where limit is
greater than the number of results. (Prior, would just kinda
loop calling audit-logs)
6 years ago
khazhyk
52c45da0bc
simplify AuditLogIterator ordering
rename reverse to oldest_first and remove cases where messages would
be ordered differently from the order we fetch audit log entries,
similar to HistoryIterator
6 years ago
khazhyk
366dc4855b
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.
6 years ago
NCPlayz
f507f508a2
Expose Metadata
Added access to:
* `/users/@me/guilds`
* `/guilds/{guild_id}`
* `/guilds/{guild_id}/members/{member_id}`
BREAKING CHANGE:
* `get_user_info` -> `fetch_user_info` to match naming scheme.
Remove useless note
Remove `reverse` and corresponding documentation
Update documentation to reflect #1988
Rename `get_` HTTP functions to `fetch_`
Breaking Changes:
* `get_message` -> `fetch_message`
* `get_invite` -> `fetch_invite`
* `get_user_profile` -> `fetch_user_profile`
* `get_webhook_info` -> `fetch_webhook`
* `get_ban` -> `fetch_ban`
Fix InviteConverter, update migrating.rst
Rename get_message to fetch_message
6 years ago
NCPlayz
fb02191b80
Organise documentation
6 years ago
Harmon
4b22dd216c
Fix ReactionIterator for limit > 100
6 years ago
Dante Dam
9656a21ebe
Bumped copyright years to 2019.
6 years ago
Hornwitser
51d626eabe
[lint] Remove redundant paranthesis
Remove redundant parenthisis around await expressions. Left over from
f25091ef
.
7 years ago
Hornwitser
c8b49d37be
[lint] Fix incorrect and inconsistent whitespace
Adjust whitespace to be consistent with the rest of the library.
7 years ago
Hornwitser
d58fc0ccee
[lint] Remove unused imports
Left over from various refactoring and rewrites.
7 years ago
Rapptz
983be10111
Fix __aiter__ compatibility with 3.7.
7 years ago
Rapptz
f25091efe1
Drop support for Python 3.4 and make minimum version 3.5.2.
7 years ago
Rapptz
e0f02f1775
Rename AsyncIterator.get to next to prevent shadowing.
8 years ago
Rapptz
152fc89508
Properly check for audit log entry termination.
8 years ago
Rapptz
eb58ddffd8
Skip None action types when iterating.
8 years ago
Rapptz
c54a6a927d
Implement audit logs.
8 years ago
Rapptz
1fc08bc5a2
Remove unused imports.
8 years ago
Rapptz
af0ba17885
Proper termination of HistoryIterator.flatten.
8 years ago
Rapptz
8e654bd52a
Add support for limit=None in Messageable.history.
Fixes #480 .
8 years ago
Rapptz
47ef657fbd
Implement async checks. Fixes #380 .
8 years ago
Rapptz
2abdbc70c2
Implement utilities for AsyncIterator.
Closes #473 .
8 years ago
Rapptz
ff9f5749e1
Update copyright year to 2017.
8 years ago
Rapptz
ae6fb54b1b
Make Reaction.users return an async iterator.
8 years ago
Rapptz
06ca518459
Rename NoMoreMessages to NoMoreItems.
8 years ago
Rapptz
8c274139df
Allow HistoryIterator to be flattened into a list.
8 years ago
Rapptz
0e0b569d53
Propagate event loop in Messageable.history.
8 years ago
Rapptz
7431a127cf
Change Messageable channel getter to be a coroutine.
8 years ago
Rapptz
98b981848d
Move message creation to a factory method inside ConnectionState.
8 years ago