Commit Graph
100 Commits
Author SHA1 Message Date
Rapptz 44a4a473ab Version bump to v0.16.12 2017-10-01 15:12:19 -04:00
Rapptz feba1d043f Sort member roles in GUILD_CREATE 2017-09-17 00:01:31 -04:00
Rapptz bf269db9e7 Version bump to v0.16.11 2017-08-29 22:38:18 -04:00
Rapptz e8d273cf8c Sort roles by hierarchy rather than by ID. 2017-08-29 22:37:57 -04:00
Rapptz ae9d73474d Game objects are really dumb. 2017-08-21 02:52:44 -04:00
Rapptz 4c87490a66 Version bump to v0.16.10 2017-08-19 12:12:04 -04:00
Rapptz 1cf712e6f3 Consume remaining keyword arguments in Game constructor. 2017-08-19 12:11:12 -04:00
Rapptz 8c14f5301c Version bump to v0.16.9 2017-08-16 19:43:02 -04:00
Rapptz 716d04f6fa Don't use find_packages here. 2017-08-16 19:39:00 -04:00
Rapptz 7f18efdafe Add default type for Game.
Good meme.
2017-08-16 19:37:35 -04:00
Rapptz 115c22633c Change yield from to await in some docstrings.
Fix #625.
2017-07-04 17:38:44 -04:00
Rapptz 7b806667cd Fix afk_channel being None in Client.edit_server 2017-06-19 04:25:05 -04:00
Rapptz f57ec81eec Documentation fix.
Fix #482
2017-05-21 17:55:09 -04:00
Rapptz 835c27f5af Version bump to v0.16.8 2017-05-21 17:49:39 -04:00
Rapptz b24b027d49 Add Permissions.view_audit_logs 2017-04-30 08:00:10 -04:00
Rapptz 4835ca3404 Revert "Add timeouts for websocket initial connections."
This reverts commit 6dca5035df.
2017-04-23 17:08:17 -04:00
Rapptz a76909e182 Fix RESUME handling and make sure to wait 5 seconds before attempting. 2017-04-22 21:36:29 -04:00
Rapptz 516c3ce530 Use an asyncio.Event instead of an asyncio.Lock for global rate limits.
There were some dead-locking issues that I suspect were due to the
way the global rate limit was handled. This changes it into a simple
Event that allows multiple coroutines to pass through instead of one
by one.
2017-04-08 18:06:11 -04:00
Rapptz 75e4163169 Don't reconnect in sharding related codes. 2017-03-15 16:54:39 -04:00
Rapptz 440bd0da60 Version bump to v0.16.7 2017-02-27 18:10:27 -05:00
Rapptz 7257ed24d8 Remove nonce when sending messages. 2017-02-27 18:02:38 -05:00
Rapptz 23ba3253dd Version bump to v0.16.6 2017-02-14 23:26:04 -05:00
Rapptz 9341be6be8 Handle HEARTBEAT_ACK 2017-02-14 23:18:02 -05:00
Rapptz dae3c66a54 Ensure after is called inside the daemon thread for players. 2017-02-14 00:57:30 -05:00
Rapptz e2de93e2a6 [commands] Make Command a descriptor for #426. 2017-02-11 05:52:27 -05:00
Rapptz ae30d2a880 Removed unused variables in routes. 2017-02-09 02:45:44 -05:00
Rapptz e6c5e40ab0 Remove unused constants in HTTPClient 2017-02-08 20:46:38 -05:00
Rapptz 91fcce30e6 Add missing continue statement in gateway futures. 2017-02-08 20:30:34 -05:00
Rapptz 3558a0db27 Only defer the lock if we're pre-emptively rate limiting.
If a 429 was already hit somehow then we're no longer pre-emptively
rate limiting and we're going to end up having a race condition in
the lock/unlock cycle.
2017-02-08 03:47:53 -05:00
Rapptz 2a6c240271 [commands] Better support for retrieving children commands.
* GroupMixin.get_command now supports fully qualified names
* Add GroupMixin.walk_commands to get an iterator of all commands.
2017-02-06 21:08:29 -05:00
Rapptz f06024f236 Fix potential chunking woe. 2017-01-23 07:08:29 -05:00
Rapptz ea95d723e8 Version bump to v0.16.5 2017-01-21 16:20:17 -05:00
Rapptz e9a09539be Allow unique invites to be created in Client.create_invite. 2017-01-21 16:19:53 -05:00
Rapptz de18a0ee47 Fix issue with chunking on userbots when a guild is unavailable. 2017-01-21 16:14:45 -05:00
Rapptz 5a6a3574b1 Fix bug with Client.move_channel and Client.move_role. 2017-01-16 18:13:49 -05:00
Rapptz 793cbedd0d Fix case where on_reaction_add returned None in PMs with users. 2017-01-13 01:11:32 -05:00
Rapptz 9626210633 Fix 404s with Client.pins_from and Client.create_role. 2017-01-12 17:59:41 -05:00
Rapptz 89eb3392af Fix HTTPClient errors from the backport. 2017-01-09 21:00:24 -05:00
Rapptz d460a747f6 Version bump to v0.16.1 2017-01-09 19:51:33 -05:00
Rapptz 6cd134ee47 Allow falsey values in Client.send_message and Client.send_file. 2017-01-09 19:51:32 -05:00
Rapptz f0fb91c35d Use CDN URL for assets. 2017-01-09 19:36:48 -05:00
Rapptz fdd835e8f1 Backport rate limit header implementation from rewrite. 2017-01-09 19:33:39 -05:00
Rapptz a8264f6540 Chunk every guild if it's a user bot.
This also increases the timeout for chunking by 30 seconds for every
chunk we're waiting for.
2016-12-24 17:32:20 -05:00
Rapptz 4d59bca4aa Support animated avatars in User.avatar_url. 2016-12-23 00:43:19 -05:00
Rapptz bed2e90e82 Properly propagate loop. Fixes #420. 2016-12-21 00:06:19 -05:00
Rapptz 5731f3405d Version bump to v0.16.0. 2016-12-19 17:53:41 -05:00
Rapptz 00e30f3106 [commands] Shield against dictionary resize in Bot.close 2016-12-17 21:18:48 -05:00
Rapptz fc1a7183a0 [commands] Unload all cogs when gracefully exiting bot. 2016-12-17 14:47:29 -05:00
Rapptz b8909ae389 [commands] Properly propagate CommandError derived exceptions.
If a command or a group raised a CommandError derived exception it
would be wrapped into CommandInvokeError. This fixes this case so it
raises the original exception instead.
2016-12-17 14:44:36 -05:00
Rapptz 6d88024f0f [commands] Add special extension function 'teardown' for clean-up.
This is to support people who want to clean up some external resource
that the extension is maintaining outside of a cog, where __unload
should be used instead.

The callable is the antipode of 'setup' and takes the same sole
parameter, the bot, after all commands, events, and cogs have been
unloaded.

Fixes #405.
2016-12-17 14:15:11 -05:00
Rapptz bafaf72c89 [commands] Unload all extensions when gracefully closing bot. 2016-12-17 14:15:10 -05:00
Rapptz c7946606f4 Add Channel.overwrites to get a channel's permission overwrites.
Fixes #414.
2016-12-17 14:00:34 -05:00
Rapptz 6302ef8094 Add support for partnered servers. Fixes #387.
This commit allows you to edit a server's invite splash, query if
something has partnered features, and retrieve the invite splash + URL.
2016-12-17 13:34:19 -05:00
Rapptz a0f4ad36eb Timeout waiting for chunking.
Sometimes the bot would keep waiting for chunks that somehow finished
before getting to the `wait` call. This is more so a temporary fix
rather than a fully correct one.
2016-12-16 21:28:12 -05:00
Rapptz 6306fc08db Discard null sequences in the gateway.
This was forbidding the Discord gateway from allowing us to RESUME
properly, causing an over-abundance of READY being called.
2016-12-16 18:29:29 -05:00
Rapptz 51fda76555 Fix typo in wait_for_reaction documentation. 2016-12-07 07:23:12 -05:00
Rapptz b7c90a5e3d Fix role comparisons.
Fixes #409
2016-12-02 01:28:54 -05:00
Rapptz 14a1bbceda Make FAQ use change_presence instead of change_status. 2016-11-30 17:08:55 -05:00
Rapptz 64733c0b19 Version bump to v0.15.1 2016-11-30 17:05:29 -05:00
Rapptz 59d17e4137 Version bump to v0.15.0 2016-11-22 19:59:28 -05:00
Rapptz 6f2603c049 [commands] Remove slots on Context.
This is to allow people to set temporary local variables by injecting
them directly into the context via some decorator or some other
mechanism. Contexts are not kept alive long enough to warrant being
slotted.
2016-11-22 19:57:19 -05:00
Rapptz c4ee4c1db4 Make discord.Embed builder more strict and easier to use.
Allow for easier use when trying to "reuse" the same discord.Embed
object by providing new methods such as Embed.clear_fields,
Embed.set_field_at, and allowing you to set things to Embed.Empty to
clear out an attribute.

For ease of use, things are automatically casted to ``str`` to prevent
the user from having HTTP 400 errors if they forgot to do so. The new
embed builder also supports "fluent-style" interface to allow you to
chain methods in a single line if necessary.

Certain parameters were removed since they were ignored by Discord
anyway such as `width` and `height` in Embed.set_image and
Embed.set_thumbnail.
2016-11-22 19:30:21 -05:00
Rapptz fb1f9ac659 Add PermissionOverwrite.is_empty to query empty state of an overwrite.
Fixes #382
2016-11-21 03:12:44 -05:00
Rapptz 7ff7b0fb9c Add Permissions.update and PermissionOverwrite.update for bulk edits.
This should satisfy those that have a one-line obsession and make things
a little bit easier if you have a dict.
2016-11-21 03:08:03 -05:00
Rapptz 92c3c2804d Support MESSAGE_REACTION_REMOVE_ALL event. 2016-11-21 02:49:50 -05:00
Rapptz e8905fd41b Add missing bucket for endpoints. 2016-11-17 21:07:54 -05:00
Rapptz 44624b7f44 Documentation fixes. 2016-11-17 20:42:06 -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 a7ba0bb7c4 Version bump to v0.14.3 2016-11-06 01:04:50 -04:00
Rapptz ae796e0d01 Change buckets for reactions. 2016-11-06 01:03:57 -04:00
Rapptz 4fa1349869 Version bump to v0.14.2 2016-11-04 00:14:07 -04:00
Rapptz edcd1750c9 Make Client.wait_for_reaction return a namedtuple instead.
Also fix a bug in the case that emoji parameter is `None`.
2016-11-04 00:02:25 -04:00
Rapptz f56dbb0379 Fix Reaction not importing.
Also bump version to v0.14.1
2016-11-03 22:28:18 -04:00
Rapptz e68e3f955d Forgot the v0.14.0 heading in the docs. 2016-11-03 22:00:45 -04:00
Rapptz 0e856494ed Version bump to v0.14.0 2016-11-03 21:52:21 -04:00
Rapptz 0e8a92cbac Add Client.wait_for_reaction to wait for a reaction from a user. 2016-11-03 21:44:24 -04:00
Rapptz 12a3403af3 Change reaction events signature and name.
This changes the event signature to be (reaction, user) instead of
(message, reaction, user) since the reaction data class already has
the message being reacted to as a member.

The name was shortened from on_message_reaction_ to on_reaction_ since
the message prefix was deemed redundant.
2016-11-03 20:16:39 -04:00
Rapptz 14def4b68e Fix Member.server_permissions docstring. 2016-10-04 18:55:34 -04:00
Rapptz b39de025c5 Add support for new Manage Webhooks permission. 2016-10-03 00:35:36 -04:00
Rapptz 18a9b75990 Fix Permissions.manage_emojis bit being incorrect. 2016-09-29 18:32:47 -04:00
Rapptz 2927e5fd39 Fix URL pointing to better method in Client.change_status 2016-09-27 01:32:45 -04:00
Rapptz 1a624cd037 Version bump to v0.13.0 2016-09-26 23:32:33 -04:00
Rapptz 7c0be1cade [commands] Raise exception if Paginator gets a line that is too big.
Fixes #340
2016-09-26 23:26:26 -04:00
Rapptz 5d8d3ab43a Add Permissions.manage_emojis 2016-09-26 23:02:44 -04:00
Rapptz 9322bc78be Add the ability to add, delete, and edit custom emoji. 2016-09-26 23:02:28 -04:00
Rapptz 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
Rapptz fc1155c160 Remove unused endpoints.py file. 2016-09-25 21:54:38 -04:00
Rapptz 1987cd10df Version bump to v0.12.0 2016-09-25 19:16:19 -04:00
Rapptz 9fddcf0a21 Update What's New page with v0.12.0 changes. 2016-09-25 19:15:48 -04:00
Rapptz 83d3b72566 Document undocumented Server.voice_client property. 2016-09-25 19:00:29 -04:00
Rapptz 6fec17d7d4 Catch Player errors and gracefully stop them.
This also introduces the concept of the after function taking a single
parameter, the current player. This is useful for error handling, e.g.
checking Player.error.

Fixes #291
2016-09-25 05:27:35 -04:00
Rapptz 96ca7cafee Add Client.get_user_info to retrieve a User from ID. 2016-09-25 04:40:31 -04:00
Rapptz 7a2b944b72 Fix 404'd FAQ links. 2016-09-25 03:58:43 -04:00
Rapptz 625ed18cff Add Member.server_permissions to calculate server permissions. 2016-09-21 04:50:22 -04:00
Rapptz 5e20b468c1 Add Server.role_hierarchy to get the current role hierarchy. 2016-09-21 04:22:13 -04:00
Rapptz 13f85b3292 Make Roles totally ordered.
This also fixes a bug with Member.top_role that chose the wrong role
should they have the same position.
2016-09-21 04:22:12 -04:00
Rapptz 09e77e548a Upgrade requirements to stable aiohttp.
Also lighten up on websockets requirements.
2016-09-20 23:08:41 -04:00