1357 Commits

Author SHA1 Message Date
Steve C
233c2d80ef Fix grammar in abc docs, add new implementation 2017-09-13 13:54:09 -04:00
Rapptz
53b4890435 Add category support.
This adds:

* CategoryChannel, which represents a category
* Guild.by_category() which traverses the channels grouping by category
* Guild.categories to get a list of categories
* abc.GuildChannel.category to get the category a channel belongs to
* sync_permissions keyword argument to abc.GuildChannel.edit to sync
  permissions with a pre-existing or new category
* category keyword argument to abc.GuildChannel.edit to move a channel
  to a category
2017-09-13 09:44:36 -04:00
Rapptz
e24914be0b [commands] Fix NameError when given an invalid prefix.
Closes #775
2017-09-12 04:22:13 -04:00
Rapptz
3cd1fdc1eb Document new features for guilds. 2017-09-12 04:21:15 -04:00
Rapptz
1367877d36 Fix crashing for now when a category is created.
A full implementation will come later.
2017-09-08 21:30:25 -04:00
Rapptz
8912625428 Fix docstrings for Webhook.send 2017-09-08 04:23:11 -04:00
Rapptz
4564b46f95 Quick start example doesn't respond to ourselves. 2017-09-05 07:03:09 -04:00
Rapptz
21fd94a449 Attempt to change how member functions are detected for Member objects 2017-09-04 20:03:50 -04:00
Rapptz
dcde896e14 Fix __hash__ for Invite objects. 2017-09-04 20:03:07 -04:00
Nick
4db76c6c6b Switched places of user and reaction in wait_for example 2017-08-31 18:07:12 -04:00
ReinaSakuraba
12a371bfb8 [commands] Add MissingPermissions and BotMissingPermissions 2017-08-30 23:21:04 -04:00
ReinaSakuraba
10696a275b [commands] Have (bot_)has_permissions provide better failure responses 2017-08-30 23:20:59 -04:00
ReinaSakuraba
8646bddc90 [commands] Add MissingPermissions and BotMissingPermissions 2017-08-30 23:20:55 -04:00
Rapptz
63bca6604b Manually format reason parameter for kick and ban.
Related to: https://github.com/aio-libs/aiohttp/issues/2235
2017-08-30 17:58:53 -04:00
Rapptz
ede1771960 Fix utils.get example. 2017-08-30 01:37:25 -04:00
Rapptz
62df23633a Sort roles by hierarchy instead of by ID.
Fixes #741
2017-08-29 16:24:04 -04:00
Steve C
221df0ab02 Update embed property doc grammar 2017-08-29 15:48:10 -04:00
Rapptz
63fcfa6d02 [commands] Add CooldownMapping.from_cooldown factory classmethod. 2017-08-27 16:59:04 -04:00
Rapptz
1c967e9a7c [commands] Export cooldown classes as well. 2017-08-27 16:55:23 -04:00
Steve C
4d421377e4 Fix on_guild_join param doc 2017-08-27 16:08:06 -04:00
Steve C
5e2d915375 Add pinning to manage_messages doc 2017-08-27 16:08:06 -04:00
Rapptz
94e2c0e661 Add upload from URL to the FAQ. 2017-08-25 09:07:30 -04:00
Rapptz
99bd595f5e Rename webhook parameters to payload to avoid shadowing.
The old names clashed with the `json` module.
2017-08-24 22:23:14 -04:00
Rapptz
e7d3085445 Webhook URLs can have dashes and underscores. 2017-08-22 17:52:10 -04:00
Ethan
7ee63a26f0 Fix docstring 2017-08-22 04:45:52 -04:00
Steve C
7ee5dc22fb Fix a couple docstrings 2017-08-22 04:45:52 -04:00
Rapptz
8eb6fa0329 Fix multi-part sending with aiohttp in webhooks. 2017-08-22 00:26:43 -04:00
Rapptz
754f3a2ae9 Don't make session a keyword only argument. 2017-08-21 14:57:57 -04:00
Rapptz
84f38b166e Add atomic keyword argument for member role editing operations.
This affects:

* Member.add_roles
* Member.remove_roles

This is the main attempt of fixing long standing bugs like #56. Since
cache consistency is too hard to ask for due to eventual consistency
and this generally being one of the only main roadblocks that the
cache ruins, it's best to just implement it in terms of the atomic
endpoint instead.

Fixes #56
2017-08-21 10:40:33 -04:00
Rapptz
e5ebea75a9 Lazily fetch Emoji.roles and Emoji.guild to prevent memory leaks.
The global emoji cache still managed to somehow cause memory leaks. By
storing IDs directly and lazily evaluating them when needed this
essentially removes all strong references to Guild objects which would
cause an explosion in memory usage.
2017-08-21 06:16:50 -04:00
Rapptz
f1e59ea933 Game objects are really dumb. 2017-08-21 02:49:49 -04:00
Rapptz
b5d987347a Fix some docstrings. 2017-08-21 02:11:00 -04:00
Rapptz
310cb05040 Fix Webhook.execute alias. 2017-08-21 02:04:44 -04:00
Rapptz
37b0fdb898 Add webhook support.
Allows for usage of either `requests` and `aiohttp` when used in
"Standalone" mode.

Fixes #704
2017-08-21 01:57:07 -04:00
Rapptz
deaba1f5ab Use time.monotonic instead of time.time for heartbeat code. 2017-08-19 22:15:29 -04:00
Rapptz
1c60f9ccf4 Consume remaining keyword arguments in Game constructor. 2017-08-19 12:10:48 -04:00
Rapptz
9a0e9b0494 Update system_content strings for MessageType.new_member. 2017-08-17 18:36:10 -04:00
Rapptz
3b3b8a5150 Remove incorrect extraneous usage of reason keyword argument.
Fixes #726
2017-08-17 18:20:28 -04:00
Rapptz
13c6a0a17a Add support for Guild.system_channel 2017-08-17 18:14:52 -04:00
Rapptz
b8c19954e4 Add default type for Game.
Good meme.
2017-08-16 19:36:17 -04:00
Ashton Tito
e0f733a5c1 use cdn url for custom emojis 2017-08-16 07:10:48 -04:00
Gorialis
80586cb081 Minor fixes in migrating doc 2017-08-16 07:09:06 -04:00
Rapptz
0f7482ed6e Add Client.latency, AutoShardedClient.latency and latencies.
This should allow an easier way to query the Discord protocol gateway
latency, defined by the difference HEARTBEAT_ACK between and the last
sent HEARTBEAT.
2017-08-15 23:41:11 -04:00
Rapptz
63231ef033 Remove reason keyword argument from message deletion.
Apparently this is unsupported.

Affected functions include:

* abc.Messageable.send
* Message.delete
* TextChannel.delete_messages
* TextChannel.purge
2017-08-15 22:38:43 -04:00
MysterialPy
adf99eb2cd Add delete_after to 'edit'.
Allow for edited messages to be deleted after [float] seconds with optional parameter delete_after.
2017-08-15 20:05:48 -04:00
Rapptz
d8360411ea Fix cases where user_id can be None in audit logs. 2017-08-15 06:12:57 -04:00
Rapptz
fce2ef5534 [commands] Raise when an invalid prefix is given.
Fixes #712
2017-08-15 06:12:09 -04:00
Rapptz
434d6dc347 Fix extraneous parentheses in Client.emojis render in migrating docs. 2017-08-12 18:41:21 -04:00
PapyrusThePlant
0d21e83b7f Fix the proxy support for aiohttp>=1.4. 2017-08-11 16:44:15 +02:00
Rapptz
eb673ec2af [commands] Ensure no mentions escape clean_content
Some clever nicknames or role names would lead themselves to
resolving to pings.
2017-08-10 03:17:24 -04:00