Commit Graph

558 Commits

Author SHA1 Message Date
4d87b2f817 Inject full Emoji to Reaction if we have it.
Reaction objects with custom Emoji are partial. If we know of this Emoji
(can find it on this client) then inject it. Otherwise, leave it as a
hollow Emoji. We can still react with a hollow Emoji, but can't get other
metadata about it.
2016-11-03 04:39:45 -04:00
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
158ac6bb50 Add around parameter to LogsFromIterator. 2016-10-16 18:10:49 -07:00
e2667a6f66 Refactor LogsFromIterator 2016-10-16 17:25:00 -07:00
adf74eef76 Update Client documentation. 2016-10-02 14:06:49 -07:00
2927e5fd39 Fix URL pointing to better method in Client.change_status 2016-09-27 01:32:45 -04:00
9322bc78be Add the ability to add, delete, and edit custom emoji. 2016-09-26 23:02:28 -04:00
7272190e2d Add support for "Do Not Disturb" and "Invisible" statuses.
This deprecates Client.change_status in favour of the newer and more
correct Client.change_presence.
2016-09-26 19:55:42 -04:00
fc1155c160 Remove unused endpoints.py file. 2016-09-25 21:54:38 -04:00
96ca7cafee Add Client.get_user_info to retrieve a User from ID. 2016-09-25 04:40:31 -04:00
203c64a9a4 Add support for server verification levels.
This adds a new enum named VerificationLevel to denote said verification
level. This enum will also be used in the Client.edit_server calls
instead of the undocumented int parameter.
2016-09-12 22:38:06 -04:00
bca6b2a133 Fix bug that disallowed ServerRegion from being used in edit_server. 2016-09-09 19:24:21 -04:00
b1da659374 Document that Client.get_channel works with PrivateChannel too. 2016-08-14 16:53:43 -04:00
b2808b2abd Document what it means that an object is not edited in-place explicitly
This seems to be a very common question regarding the docs so might as
well document exactly what this means rather than using cryptic and
confusing wording.
2016-08-14 13:52:08 -04:00
c5a989eeb2 Add custom emoji support. 2016-07-31 22:39:43 -07:00
667d2b384b Add functions to query and actually prune members from a server. 2016-07-29 14:40:30 -04:00
feeff2b848 Clarify that Client.purge_from requires Manage Messages for anything. 2016-07-29 09:59:28 -04:00
fbd628fae3 Fix KeyError when creating private channels in start_private_message.
I was not passing the full updated v6 payload.
2016-07-25 06:16:22 -04:00
b862223a1f Fix TypeError when constructing a channel in start_private_message. 2016-07-23 02:14:02 -04:00
b0f5584961 Add AppInfo.owner attribute. 2016-07-21 01:16:29 -04:00
1c8ab25917 Add support for querying information about group calls. 2016-07-15 22:46:00 -04:00
18e77f356d Save email when login with a token on a user account 2016-07-06 17:38:41 +02:00
6f3bd7c0e6 Fix issue with removing roles out of order.
Fixes #250.
2016-07-04 08:01:57 -04:00
e1f8bdc440 Make PyNaCl optional 2016-06-28 00:58:11 -04:00
abf9be5f7d Guild Sharding support 2016-06-26 14:47:16 -04:00
c34eb5f6dd Document that bot users can't use Client.accept_invite 2016-06-26 14:18:47 -04:00
6061f83c3f Fix bug with edit_profile for user accounts 2016-06-23 13:52:42 -05:00
c02d9403e6 Fix bug with Client.server_voice_state not deafening. 2016-06-22 19:39:20 -04:00
8b3617111a Support for v5 Gateway. 2016-06-22 05:00:08 -04:00
c3c9db7777 Fix bug with deleting private messages.
This was due to an AttributeError occurring when getting the guild_id
from the channel. PrivateChannels do not have guild_ids so they should
be None.
2016-06-20 22:11:43 -04:00
6b4d22ce81 Clarify that Client.logs_from can take a PrivateChannel too. 2016-06-18 02:15:36 -04:00
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
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
eeba4963f3 The name is required in Client.edit_channel so add it if it is missing. 2016-06-15 20:31:13 -04:00
7c760d3271 Add Client.get_message 2016-06-15 04:46:19 -04:00
d7efc9778b Make Client.edit_channel_permissions use PermissionOverwrite. 2016-06-14 22:26:14 -04:00
f0fc70b2cf Add a way to set permission overwrites when creating a channel. 2016-06-14 22:26:14 -04:00
46babe822a Fix bug with editing messages over private messages. 2016-06-14 22:26:13 -04:00
7d5d8aa918 Doc string typos 2016-06-14 18:53:40 -04:00
f6ef4868d1 Fix concurrently joining more than one voice server at a time 2016-06-13 01:43:55 -07:00
8d1867393c Give Client.email a default value of None. 2016-06-12 23:44:41 -04:00
c3933c379a Make the default filename a little bit prettier. 2016-06-12 23:43:03 -04:00
3895cf9295 Fix bug with login token not being properly written in cache. 2016-06-12 23:25:22 -04:00
b496ea7972 Fix bug with logs_from URL params not being correct.
The bug happened because I forgot to pass in the id attribute.
2016-06-12 23:00:33 -04:00
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
64c1e7d199 Fix bug with logging in with email and password. 2016-06-12 22:41:14 -04:00
879584b81a Fix bug with edit_role and create_role not working.
This was due to an error in overzealous removal of code.
2016-06-12 22:40:35 -04:00
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
fa36a449e9 Change HTTPException to only take a single parameter. 2016-06-12 13:57:05 -04:00
a175c86aa1 Add Client.application_info to retrieve the current app info.
Fixes #241.
2016-06-10 22:28:15 -04:00