286 Commits

Author SHA1 Message Date
Rapptz
ced617e786 Use the improved role creation endpoint for making roles. 2017-01-13 01:30:09 -05:00
Rapptz
c8247371f1 Fix 404s in pins_from and create_role routes. 2017-01-12 18:05:46 -05:00
Rapptz
94448d3972 Fix NameError inside HTTPClient.edit_member. 2017-01-09 21:30:59 -05:00
Rapptz
b86a568f86 Fix HTTP.application_info 404ing. 2017-01-09 20:58:58 -05:00
Rapptz
6d33ea748a Implement rate limit headers. 2017-01-09 18:51:24 -05:00
Rapptz
20041ea756 Implement AutoShardedClient for transparent sharding.
This allows people to run their >2,500 guild bot in a single process
without the headaches of IPC/RPC or much difficulty.
2017-01-07 23:19:39 -05:00
Rapptz
98b981848d Move message creation to a factory method inside ConnectionState. 2017-01-03 09:52:10 -05:00
Rapptz
79a49f9145 Absolute import some circular dependencies to appease Python 3.4. 2017-01-03 09:52:02 -05:00
Rapptz
a1c81419b7 Rename MessageChannel.send_message to send and unify interface.
This removes MessageChannel.upload.
2017-01-03 09:52:01 -05:00
Rapptz
5cb3ad14e8 Make emojis and members stateful. 2017-01-03 09:51:55 -05:00
Rapptz
d1d54a468a Rename Server to Guild everywhere. 2017-01-03 09:51:54 -05:00
Rapptz
bed2e90e82 Properly propagate loop. Fixes #420. 2016-12-21 00:06:19 -05:00
Rapptz
e8905fd41b Add missing bucket for endpoints. 2016-11-17 21:07:54 -05:00
Rapptz
18178c26aa Add support for clearing a message's reactions. 2016-11-17 20:37:33 -05:00
Rapptz
4c1fd2c9b1 Add atomic add and remove role endpoints to HTTPClient.
These are currently unused since their use is pretty limited.
2016-11-17 20:27:43 -05:00
Rapptz
a312f21bc3 Support message editing with rich embeds. 2016-11-13 22:12:16 -05:00
Rapptz
af46718460 Add support for rich embeds. 2016-11-13 05:07:58 -05:00
Rapptz
ae796e0d01 Change buckets for reactions. 2016-11-06 01:03:57 -04:00
khazhyk
c4acc0e1a1 Add support for reactions.
Reactions can be be standard emojis, or custom server emojis.

Adds
 - add/remove_reaction
 - get_reaction_users
 - Messages have new field reactions
 - new events - message_reaction_add, message_reaction_remove
 - new permission - add_reactions
2016-10-27 21:36:32 -07:00
khazhyk
158ac6bb50 Add around parameter to LogsFromIterator. 2016-10-16 18:10:49 -07:00
Rapptz
9322bc78be Add the ability to add, delete, and edit custom emoji. 2016-09-26 23:02:28 -04:00
Rapptz
96ca7cafee Add Client.get_user_info to retrieve a User from ID. 2016-09-25 04:40:31 -04:00
Rapptz
667d2b384b Add functions to query and actually prune members from a server. 2016-07-29 14:40:30 -04:00
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