124 Commits

Author SHA1 Message Date
Rapptz
3d03dbc451 Change internal role storage in Guild to a dict instead of a list.
This adds the following APIs:

* Guild.get_role

This removes the following APIs:

* Guild.role_hierarchy

To compensate for the removed APIs, Guild.roles is now a sorted list
based on hierarchy. The first element will always be the @everyone
role.

This speeds up access at the cost of some memory, theoretically.
2018-09-24 21:08:48 -04:00
Vexs
262c0d3a9e Correct note note about editing emoji in Guild.create_custom_emoji.
Remove incorrect note; extension of #1575
2018-09-20 23:45:15 -04:00
Rapptz
5c24e69cf2 Fix up the Sphinx strings causing warnings. 2018-09-15 09:54:00 -04:00
PikalaxALT
0e6082c57d Implement roles kwarg for guild.create_custom_emoji and emoji.edit 2018-08-22 21:06:09 -04:00
bmintz
ec3435b224 Remove remaining asyncio.coroutine calls.
Also remove Client.async_event
2018-07-05 03:45:58 -04:00
Rapptz
f25091efe1 Drop support for Python 3.4 and make minimum version 3.5.2. 2018-06-10 18:10:00 -04:00
Steve C
0e945915b7 Fixes various documentation errors/inconsistencies
Mostly dealing with permissions, also fixes Raw Events inclusion.
2018-05-18 20:25:54 -04:00
Rapptz
07a535f514 Document user parameter in Guild.get_ban 2018-05-08 22:03:30 -04:00
slice
9fe7776a33
Add support for getting individual ban entries 2018-05-07 16:42:04 -07:00
Rapptz
95de4d1df1 Actually fix the order in Guild.by_category. 2018-03-31 23:16:53 -04:00
Rapptz
87a7efc410 Flip comparison in Guild.by_category. 2018-03-31 22:55:42 -04:00
Rapptz
796ff6d7e6 Sort voice channels below text channels in Guild.by_category 2018-03-25 04:00:47 -04:00
Rapptz
f8f8f418f3 Split Game object to separate Activity subtypes for Rich Presences.
This is a massive breaking change.

* All references to "game" have been renamed to "activity"
* Activity objects contain a majority of the rich presence information
* Game and Streaming are subtypes for memory optimisation purposes for
  the more common cases.
* Introduce a more specialised read-only type, Spotify, for the
  official Spotify integration to make it easier to use.
2018-03-05 11:15:49 -05:00
Tobotimus
3112e1c17e Add intersphinx 2018-01-06 17:23:59 -05:00
Pandentia
b22f7c76c5 Further clarify how bots can interact with emoji endpoints
Clarifies that bot accounts can only interact with emoji they have
created.
2017-10-03 00:22:06 +02:00
Pandentia
51a696e674 Remove reference to "whitelisted" bots for emoji endpoints
Due to a recent change in the Discord API, bots can now create
guild-specific emoji, so I've removed the parts of the documentation
referencing this restriction.
2017-10-03 00:10:01 +02:00
Rapptz
711dfb83ab Allow creating a channel with a category. 2017-09-29 05:54:29 -04:00
Rapptz
6d6ce14d7c Fix Guild.system_channel always returning None.
Fixes #811
2017-09-26 22:56:26 -04:00
Rapptz
148816c4e8 Temporarily add created channels to cache.
This should fix issues when doing a `abc.GuildChannel.edit` immediately
afterwards and then when the corresponding CHANNEL_CREATE comes in the
channel instance should hopefully be overwritten by the authoritative
figure, the WebSocket.
2017-09-23 18:54:12 -04:00
Rapptz
95c28f08e4 Fix sorting for channels. 2017-09-21 00:11:36 -04:00
Jake
3e00e7fe8a [guild] use a defaultdict in by_category 2017-09-20 21:08:46 -07:00
Rapptz
7b2e06c263 Fix error when creating guild channels. 2017-09-13 18:47:40 -04:00
Rapptz
7df8897e3d Add Guild.create_category.
An alias, Guild.create_category_channel is provided.
2017-09-13 17:01:42 -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
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
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
13c6a0a17a Add support for Guild.system_channel 2017-08-17 18:14:52 -04:00
Rapptz
e493f1f2f4 Remove Guild.create_invite too since it relies on a default channel. 2017-07-31 21:39:48 -04:00
Rapptz
3dc1195637 Remove Guild.default_channel
The concept no longer exists.
2017-07-31 21:32:12 -04:00
khazhyk
2c4876f2e7 add Guild.icon_url_as
Guild icons can also be up to 1024px, jpg, png, or webp
2017-07-25 06:09:41 -04:00
Rapptz
06c99533de Fix passing None to afk_channel in Guild.edit. 2017-06-19 04:22:42 -04:00
Rapptz
a8474ed6d3 Document that exceptions happen in Guild.audit_logs. 2017-05-25 20:16:03 -04:00
Rapptz
f588876587 Use Python3Lexer instead of PythonLexer for pygments. 2017-05-22 07:21:23 -04:00
Rapptz
f4e01b3a92 Make supported operations stand out more than attributes. 2017-05-20 02:08:34 -04:00
Rapptz
f73eb087c9 Use describe instead of tables for supported operations. 2017-05-13 18:48:14 -04:00
Rapptz
b44bba6ee6 First pass at documentation reform. 2017-05-12 20:14:34 -04:00
Rapptz
8081a654e8 Remove Guild.change_vanity_invite in favour of Guild.edit 2017-05-09 17:49:05 -04:00
Rapptz
a0fc1402d7 Rename GuildRegion to VoiceRegion.
This naming makes more sense since voice regions are not a guild
exclusive concept.
2017-05-09 13:42:35 -04:00
Rapptz
dff6bcc745 Add support for audit log reasons.
Most routes now have a 'reason' keyword argument.
2017-05-07 03:08:06 -04:00
Rapptz
ba2dad2093 Add support for setting and retrieving guild vanity invites. 2017-04-30 07:17:00 -04:00
Twentysix
86b9099f3a Changed audit_log to audit_logs in documentation 2017-04-30 12:56:58 +02:00
Rapptz
c54a6a927d Implement audit logs. 2017-04-30 02:58:27 -04:00
Rapptz
65bd510df6 Add Guild.voice_client shortcut. 2017-04-18 04:07:05 -04:00
Rapptz
728fae9285 Add Guild.explicit_content_filter. 2017-04-12 20:18:28 -04:00
Rapptz
9fcbe5c678 Sort Guild.text_channels and Guild.voice_channels in UI order. 2017-03-23 19:34:36 -04:00
Rapptz
9a1215e13b Add support for message acking. 2017-02-27 23:29:52 -05:00
Rapptz
b2ffeac297 Make Guild.large a property instead of an attribute. 2017-02-24 17:51:27 -05:00
Rapptz
6516932e67 Fix Guild.bans to return a BanEntry object. 2017-02-16 16:13:20 -05:00
Rapptz
3504de4635 Fix more places where server is used instead of guild in docstrings. 2017-02-08 22:51:40 -05:00