Commit Graph

90 Commits

Author SHA1 Message Date
580b4baef9 Fix view_audit_log incorrect pluralisation. 2017-04-08 18:05:46 -04:00
8a34c412ed Add Permissions.view_audit_log 2017-03-21 19:39:06 -04:00
702d596af9 Check that the type in Colour and Permissions are int. 2017-02-21 08:19:32 -05:00
1ec7daf372 Documentation fixes for permission. 2017-02-13 02:44:29 -05:00
ff9f5749e1 Update copyright year to 2017. 2017-01-20 23:19:19 -05:00
6d3a5eaeb6 Remove extraneous kwargs from Permissions constructor. 2017-01-13 01:27:16 -05:00
dceba9d962 Add useful repr to all data classes. 2017-01-03 09:52:06 -05:00
d1d54a468a Rename Server to Guild everywhere. 2017-01-03 09:51:54 -05:00
e4b16851bf Slots use tuples instead now. 2017-01-03 09:51:50 -05:00
fb1f9ac659 Add PermissionOverwrite.is_empty to query empty state of an overwrite.
Fixes #382
2016-11-21 03:12:44 -05:00
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
c4acc0e1a1 Add support for reactions.
Reactions can be be standard emojis, or custom server emojis.

Adds
 - add/remove_reaction
 - get_reaction_users
 - Messages have new field reactions
 - new events - message_reaction_add, message_reaction_remove
 - new permission - add_reactions
2016-10-27 21:36:32 -07:00
b39de025c5 Add support for new Manage Webhooks permission. 2016-10-03 00:35:36 -04:00
18a9b75990 Fix Permissions.manage_emojis bit being incorrect. 2016-09-29 18:32:47 -04:00
5d8d3ab43a Add Permissions.manage_emojis 2016-09-26 23:02:44 -04:00
cfca7eb1f8 Rename Permissions.change_nicknames to change_nickname to match UI.
This is a breaking change.
2016-07-30 13:11:16 -04:00
ad226f2020 Add new External Emojis permission. 2016-07-24 07:56:48 -04:00
fb82a37cc6 Add discord.PermissionOverwrite type for channel-specific overwrites. 2016-06-14 22:26:13 -04:00
f3f3ab1cd4 Reference the Discord UI in the permission documentation. 2016-05-23 15:06:09 -04:00
dd8a60f743 Add Permissions.administrator and change Permissions.manage_roles 2016-05-12 21:10:02 -04:00
1acf478fb7 Make Permissions an iterable class. 2016-05-01 07:22:45 -04:00
21c88cf727 Make Permissions partially-ordered.
Specifically:

* P1 <= P2 iff P1 expresses a subset of the permissions expressed by P2.

* P1 < P2 iff P1 <= P2 and P1 != P2

* vice versa for P1 >= P2 and P1 > P2
2016-04-30 23:00:22 -04:00
cc78cfedb6 Add permissions for changing or managing nicknames. 2016-04-29 06:23:09 -04:00
160cbc81e7 Clarify channel-specific permissions documentation.
Manage Roles and Manage Channels is renamed to "Manage Permissions" and
"Manage Channel" in the discord UI, clarify which fields in the Permission
object those map to.
2016-04-05 14:30:04 -04:00
855fa7e553 Documentation fixes for Permissions related code. 2016-01-14 12:24:59 -05:00
db4cc791dd Update license of files to 2016. 2016-01-04 22:28:29 -05:00
5a1d7a2d94 Change permissions to remove the can_ prefix. 2016-01-03 21:45:28 -05:00
483384595b Unflip kick/ban permission bits 2015-12-22 17:58:43 -08:00
f1f0e169e4 Add __slots__ where appropriate to data classes. 2015-12-19 06:18:12 -05:00
51d91c2a82 Most data classes now support hashing. 2015-12-17 00:32:54 -05:00
434fc5c79e Remove the non-classmethod attributes in Permissions. 2015-12-16 22:21:09 -05:00
9137d92f67 All data classes now support !=, == and str(obj). 2015-12-13 22:53:48 -05:00
98ba68bb66 Simplified permissions bit operations. 2015-12-10 06:08:49 -05:00
b94dffaf87 Change Permissions constants to be class method factories instead. 2015-10-22 22:20:34 -04:00
8fbaa29e9c Document Permissions constants and set default permissions to 0. 2015-10-17 07:17:40 -04:00
61f62c1468 Add Channel.permissions_for and PrivateChannel.permissions_for.
These functions handle permission resolution for a specific member.

Aids with #18.
2015-10-17 06:21:51 -04:00
2559051e06 Pass kwargs to all constructors for future proofing. 2015-10-13 05:39:57 -04:00
afdada133f Permissions are now properties rather than functions.
This allows you to set or retrieve specific bits through a
higher level API to facilitate editing in the future.
2015-09-03 03:40:56 -04:00
b7fc383013 Python3 import fixes. 2015-08-28 16:55:40 -04:00
bcaf33e304 Preliminary work on permission parsing.
Thanks Voltagei.
2015-08-26 07:14:24 -04:00