13 Commits

Author SHA1 Message Date
Rapptz
ddd3fd0a3d Begin working on gateway v6 changes.
The first batch of changes are related to channel types and group
direct messages. Support these first so READY begins parsing.
2016-07-13 00:10:16 -04:00
Rapptz
c02d9403e6 Fix bug with Client.server_voice_state not deafening. 2016-06-22 19:39:20 -04:00
Rapptz
8b3617111a Support for v5 Gateway. 2016-06-22 05:00:08 -04:00
Rapptz
b3edb31df5 Add support for message pinning.
This includes `Client.pin_message`, `Client.unpin_message` and
`Client.pins_from`. This also adds the `Message.pinned` attribute
to the `Message` object.
2016-06-18 02:14:44 -04:00
Rapptz
4d375fc856 Fix HTTPClient.recreate to actually work.
Forgot a keyword argument.
2016-06-18 01:43:57 -04:00
Rapptz
2ebc0ab218 Don't assume that any shared fields are optional in Client.edit_channel.
Thanks Jake and night.
2016-06-15 20:56:43 -04:00
Rapptz
fa0c98da4c Make logging for HTTP requests more useful. 2016-06-15 20:16:32 -04:00
Rapptz
7c760d3271 Add Client.get_message 2016-06-15 04:46:19 -04:00
Rapptz
f0fc70b2cf Add a way to set permission overwrites when creating a channel. 2016-06-14 22:26:14 -04:00
Rapptz
c162b666ea Fix bucket for change_nickname. 2016-06-14 19:15:11 -04:00
Hornwitser
e516c24746 Fix exception when handling login failure
Logging in with an invalid token would throw a TypeError due to improper
passing of arguments to HTTPClient._token.  Fix by properly passing the
keyword only bot argument.
2016-06-14 18:52:48 +02:00
Rapptz
f3b257b342 Fix bug with uploading file-like objects.
I would require bytes-like objects instead due to its usage inside
the HTTPClient. Release this restriction so old `send_file` code works.
2016-06-12 22:41:30 -04:00
Rapptz
1fba1b06fa Rewrite HTTP handling significantly.
This should have a more uniform approach to rate limit handling. Instead
of queueing every request, wait until we receive a 429 and then block
the requesting bucket until we're done being rate limited. This should
reduce the number of 429s done by the API significantly (about 66% avg).

This also consistently checks for 502 retries across all requests.
2016-06-12 20:33:09 -04:00