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
This commit is contained in:
Rapptz
2017-09-13 09:38:05 -04:00
parent e24914be0b
commit 53b4890435
8 changed files with 249 additions and 32 deletions

View File

@ -1912,6 +1912,13 @@ VoiceChannel
:members:
:inherited-members:
CategoryChannel
~~~~~~~~~~~~~
.. autoclass:: CategoryChannel()
:members:
:inherited-members:
DMChannel
~~~~~~~~~