66 Commits

Author SHA1 Message Date
Skezza
c3bca7ec73
Documentation formatting 2020-06-30 23:32:00 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation (#5067) 2020-06-28 03:45:58 -04:00
Rapptz
215fed831c Mention that you can create Permissions via kwargs now 2020-01-23 00:04:45 -05:00
Rapptz
02397306b2 Drop superfluous zero in version related changes in the documentation 2020-01-21 03:47:56 -05:00
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
Rapptz
650beee53d Add instance check to PermissionOvewrite.__eq__ 2020-01-19 02:41:50 -05:00
Rapptz
2770137bd6 Redesign permissions to allow aliases to be used.
This adds manage_permissions, view_channel, and use_external_emojis
aliases to Permissions. It should be noted that to prevent breaking
changes and for sake of usefulness, aliases are not included in
the `__iter__` for either Permissions or PermissionOverwrite.

Fixes #2496
2020-01-11 19:52:25 -05:00
Josh B
46246a2844 Add view_guild_insights permission 2019-11-15 04:23:26 -05:00
NCPlayz
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
NCPlayz
84e86ff666 Add Permissions.stream
Add stream to Permissions classmethods
2019-04-12 20:58:11 -04:00
DevilXD
9d92939fbe Added support for comparing PermissionOverwrites
When trying to check if a specific permission overwrite is already set on a channel, it can be done by fetching the already existing overwrite and comparing it with a one you want to set. Comparing them directly wasn't possible before, and this small change allows for that.
Could be expanded for other comparison operators, not sure how it would work though.
2019-01-28 22:22:54 -05:00
Dante Dam
9656a21ebe Bumped copyright years to 2019. 2019-01-28 22:22:50 -05:00
StarrFox
eab0a4f38d Fix typo in Permissions.all_channel 2019-01-28 21:41:56 -05:00
Laurenz
dd884a6afe Update Message.mention_everyone docs to include @here 2018-12-14 19:05:34 -05:00
Hornwitser
633192b3cd [lint] Replace equality comparisons to singletons
Restrict the values accepted by comparisons with booleans to be actual
booleans.

Minor breaking of undocumented behaviour in permissions; the value to
set bits to must be booleans (as indicated by the type error thrown).
2018-11-24 22:17:57 -05:00
BeatButton
a4d1599ce9 Change docstrings to raw-strings 2018-09-14 22:55:27 -04:00
Hornwitser
c8b49d37be [lint] Fix incorrect and inconsistent whitespace
Adjust whitespace to be consistent with the rest of the library.
2018-08-22 21:43:53 -04:00
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