aboutsummaryrefslogtreecommitdiff
path: root/discord/role.py
Commit message (Collapse)AuthorAgeFilesLines
* Bumped copyright years to 2019.Dante Dam2019-01-281-1/+1
|
* Fix NameError and duplicate insertion bug when moving roles.Rapptz2018-09-241-1/+1
|
* Change internal representation of roles in Member and Emoji.Rapptz2018-09-241-1/+2
| | | | | | | | | | | | | | | Introduce a new internal type, SnowflakeList, which has better memory footprint over a regular list or set of roles. It is suspected that there will be a 9x reduction of memory for every Emoji instance and a 48 byte saving per Member instance. However, these savings will probably only be evident on larger bots. As a consequence of this change, Member.roles is now computed lazily. Currently I am not sure if I want to do the initial sorting on the SnowflakeList for Member, as this comes with a O(n log n) cost when creating a Member for little purpose since SnowflakeList.has is not overly relied on. If CPU time becomes an issue this might change.
* Change internal role storage in Guild to a dict instead of a list.Rapptz2018-09-241-4/+1
| | | | | | | | | | | | | | | | This adds the following APIs: * Guild.get_role This removes the following APIs: * Guild.role_hierarchy To compensate for the removed APIs, Guild.roles is now a sorted list based on hierarchy. The first element will always be the @everyone role. This speeds up access at the cost of some memory, theoretically.
* Take the default role property into account when comparing roles.Rapptz2018-09-241-0/+6
|
* [lint] Fix incorrect and inconsistent whitespaceHornwitser2018-08-221-1/+1
| | | | Adjust whitespace to be consistent with the rest of the library.
* [lint] Remove unused importsHornwitser2018-08-221-2/+0
| | | | Left over from various refactoring and rewrites.
* Drop support for Python 3.4 and make minimum version 3.5.2.Rapptz2018-06-101-10/+7
|
* Fixes various documentation errors/inconsistenciesSteve C2018-05-181-2/+2
| | | | Mostly dealing with permissions, also fixes Raw Events inclusion.
* Add intersphinxTobotimus2018-01-061-7/+7
|
* Make supported operations stand out more than attributes.Rapptz2017-05-201-16/+18
|
* Use describe instead of tables for supported operations.Rapptz2017-05-131-21/+31
|
* Add support for audit log reasons.Rapptz2017-05-071-7/+14
| | | | Most routes now have a 'reason' keyword argument.
* Change some format usage to use %-formatting.Rapptz2017-05-041-1/+1
| | | | | Minor speed increase when we're not doing excessive attribute access or any type of formatting.
* Fix NameError in Role.edit when moving roles.Rapptz2017-04-221-0/+1
|
* Make Role.members use a list comprehension.Rapptz2017-03-251-5/+1
|
* Fix NameError in Role.editRapptz2017-03-051-1/+1
|
* Remove extra space.Rapptz2017-02-281-1/+1
|
* Change Role.is_everyone to Role.is_default.Rapptz2017-01-291-4/+4
|
* Make all public is_ functions into methods instead of properties.Rapptz2017-01-291-3/+2
|
* Update copyright year to 2017.Rapptz2017-01-201-1/+1
|
* Fix bug with GuildChannel.edit and Role.edit with positions.Rapptz2017-01-161-2/+1
| | | | I did not update the HTTP code for these two methods.
* Add Role.members to get every member with a role.Rapptz2017-01-031-0/+13
|
* Add useful repr to all data classes.Rapptz2017-01-031-0/+3
|
* Make roles and guilds stateful.Rapptz2017-01-031-0/+108
|
* Rename Server to Guild everywhere.Rapptz2017-01-031-10/+10
|
* Switch IDs to use int instead of strRapptz2017-01-031-10/+10
|
* Begin working on the rewrite.Rapptz2017-01-031-14/+15
|
* Fix role comparisons.Rapptz2016-12-021-1/+1
| | | | Fixes #409
* Make Roles totally ordered.Rapptz2016-09-211-11/+49
| | | | | This also fixes a bug with Member.top_role that chose the wrong role should they have the same position.
* Clarify Role.position documentation.Rapptz2016-06-011-1/+2
|
* Add Role.server attribute.Rapptz2016-06-011-5/+5
| | | | This breaks events that expected a server parameter for the role events.
* Add Role.mentionable attribute.Rapptz2016-04-291-1/+4
|
* Add Role.mention propertyRapptz2016-04-291-0/+5
|
* Fix typo in Role.created_atKhazhismel Kumykov2016-04-091-1/+1
|
* Add missing created_at properties for other objects.Rapptz2016-03-251-0/+6
| | | | Such as Channel, PrivateChannel, Object and Role.
* Change internal update functions to have a leading underscore.Rapptz2016-01-111-2/+2
|
* Update license of files to 2016.Rapptz2016-01-041-1/+1
|
* Add __slots__ where appropriate to data classes.Rapptz2015-12-191-2/+5
|
* Most data classes now support hashing.Rapptz2015-12-171-2/+4
|
* Make more things into properties.Rapptz2015-12-161-0/+1
| | | | | | A lot of the expensive getters were transformed into cached properties instead. A lot of things that were properties were transformed into properties as well.
* All data classes now support !=, == and str(obj).Rapptz2015-12-131-1/+17
|
* Fix bug where Role.is_everyone doesn't propagate in GUILD_ROLE_UPDATE.Rapptz2015-12-101-1/+3
|
* Switch to NumPy style documentation.Rapptz2015-12-041-22/+14
|
* Role.is_everyone actually uses the proper check.Rapptz2015-11-091-1/+1
|
* Split data classes into more files.Rapptz2015-10-271-162/+1
|
* Change Colour constants to be class method factories instead.Rapptz2015-10-221-95/+109
|
* Better detection for the everyone role. Fixes #23.Rapptz2015-10-211-2/+2
|
* Better detection for the @everyone role.Rapptz2015-10-171-2/+7
|
* Add Role.managed property.Rapptz2015-10-161-0/+5
|