49 Commits

Author SHA1 Message Date
slice
e6f1a7e93a
Add Permissions.priority_speaker. 2018-07-31 19:58:45 -07:00
Hornwitser
96baabcaa2 Fix typo in Permissions.is_subset/is_superset
Fix the name for the other's type when raising TypeError being
incorrectly written as __class__name instead of __class__.__name__ in
the is_subset and is_superset methods of the Permissions class.  This
was introduced at the creation of these methods in 21c88cf.
2018-06-21 07:44: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
Steve C
5e2d915375 Add pinning to manage_messages doc 2017-08-27 16:08:06 -04:00
Mitchell Ferree
ecdd21212c Disallow setting non-permission attributes 2017-08-08 22:19:59 -04:00
Rapptz
34815a43f4 Permissions.view_audit_logs -> Permissions.view_audit_log 2017-05-28 22:00:43 -04:00
Rapptz
d672f84932 Raise when an invalid permission is passed to PermissionOverwrite. 2017-05-20 15:34:41 -04:00
Rapptz
bd7b2e2d35 Oversight in Permissions still having a table. 2017-05-20 08:47:08 -04:00
Rapptz
c54a6a927d Implement audit logs. 2017-04-30 02:58:27 -04:00
Rapptz
580b4baef9 Fix view_audit_log incorrect pluralisation. 2017-04-08 18:05:46 -04:00
Rapptz
8a34c412ed Add Permissions.view_audit_log 2017-03-21 19:39:06 -04:00
Rapptz
702d596af9 Check that the type in Colour and Permissions are int. 2017-02-21 08:19:32 -05:00
Rapptz
1ec7daf372 Documentation fixes for permission. 2017-02-13 02:44:29 -05:00
Rapptz
ff9f5749e1 Update copyright year to 2017. 2017-01-20 23:19:19 -05:00
Rapptz
6d3a5eaeb6 Remove extraneous kwargs from Permissions constructor. 2017-01-13 01:27:16 -05:00
Rapptz
dceba9d962 Add useful repr to all data classes. 2017-01-03 09:52:06 -05:00
Rapptz
d1d54a468a Rename Server to Guild everywhere. 2017-01-03 09:51:54 -05:00
Rapptz
e4b16851bf Slots use tuples instead now. 2017-01-03 09:51:50 -05:00
Rapptz
fb1f9ac659 Add PermissionOverwrite.is_empty to query empty state of an overwrite.
Fixes #382
2016-11-21 03:12:44 -05:00
Rapptz
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
khazhyk
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
Rapptz
b39de025c5 Add support for new Manage Webhooks permission. 2016-10-03 00:35:36 -04:00
Rapptz
18a9b75990 Fix Permissions.manage_emojis bit being incorrect. 2016-09-29 18:32:47 -04:00
Rapptz
5d8d3ab43a Add Permissions.manage_emojis 2016-09-26 23:02:44 -04:00
Rapptz
cfca7eb1f8 Rename Permissions.change_nicknames to change_nickname to match UI.
This is a breaking change.
2016-07-30 13:11:16 -04:00
Rapptz
ad226f2020 Add new External Emojis permission. 2016-07-24 07:56:48 -04:00
Rapptz
fb82a37cc6 Add discord.PermissionOverwrite type for channel-specific overwrites. 2016-06-14 22:26:13 -04:00
Rapptz
f3f3ab1cd4 Reference the Discord UI in the permission documentation. 2016-05-23 15:06:09 -04:00
Rapptz
dd8a60f743 Add Permissions.administrator and change Permissions.manage_roles 2016-05-12 21:10:02 -04:00
Rapptz
1acf478fb7 Make Permissions an iterable class. 2016-05-01 07:22:45 -04:00
Milo Mirate
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
Rapptz
cc78cfedb6 Add permissions for changing or managing nicknames. 2016-04-29 06:23:09 -04:00
Khazhismel Kumykov
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
Rapptz
855fa7e553 Documentation fixes for Permissions related code. 2016-01-14 12:24:59 -05:00
Rapptz
db4cc791dd Update license of files to 2016. 2016-01-04 22:28:29 -05:00
Rapptz
5a1d7a2d94 Change permissions to remove the can_ prefix. 2016-01-03 21:45:28 -05:00
abalabahaha
483384595b Unflip kick/ban permission bits 2015-12-22 17:58:43 -08:00
Rapptz
f1f0e169e4 Add __slots__ where appropriate to data classes. 2015-12-19 06:18:12 -05:00
Rapptz
51d91c2a82 Most data classes now support hashing. 2015-12-17 00:32:54 -05:00
Rapptz
434fc5c79e Remove the non-classmethod attributes in Permissions. 2015-12-16 22:21:09 -05:00
Rapptz
9137d92f67 All data classes now support !=, == and str(obj). 2015-12-13 22:53:48 -05:00
Rapptz
98ba68bb66 Simplified permissions bit operations. 2015-12-10 06:08:49 -05:00
Rapptz
b94dffaf87 Change Permissions constants to be class method factories instead. 2015-10-22 22:20:34 -04:00
Rapptz
8fbaa29e9c Document Permissions constants and set default permissions to 0. 2015-10-17 07:17:40 -04:00
Rapptz
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
Rapptz
2559051e06 Pass kwargs to all constructors for future proofing. 2015-10-13 05:39:57 -04:00
Rapptz
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
Rapptz
b7fc383013 Python3 import fixes. 2015-08-28 16:55:40 -04:00
Rapptz
bcaf33e304 Preliminary work on permission parsing.
Thanks Voltagei.
2015-08-26 07:14:24 -04:00