diff options
| author | Rapptz <[email protected]> | 2017-09-13 09:38:05 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-09-13 09:44:36 -0400 |
| commit | 53b48904358866e62c6afec1a548424f12c7e1d1 (patch) | |
| tree | 77d14c0e8e0bf62311f731e29bec9487cab684d3 /discord/enums.py | |
| parent | [commands] Fix NameError when given an invalid prefix. (diff) | |
| download | discord.py-53b48904358866e62c6afec1a548424f12c7e1d1.tar.xz discord.py-53b48904358866e62c6afec1a548424f12c7e1d1.zip | |
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
Diffstat (limited to 'discord/enums.py')
| -rw-r--r-- | discord/enums.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/discord/enums.py b/discord/enums.py index 41762bf8..88857bd1 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -31,10 +31,11 @@ __all__ = ['ChannelType', 'MessageType', 'VoiceRegion', 'VerificationLevel', 'AuditLogAction', 'AuditLogActionCategory', 'UserFlags', ] class ChannelType(Enum): - text = 0 - private = 1 - voice = 2 - group = 3 + text = 0 + private = 1 + voice = 2 + group = 3 + category = 4 def __str__(self): return self.name |