aboutsummaryrefslogtreecommitdiff
path: root/discord/role.py
Commit message (Collapse)AuthorAgeFilesLines
* Rework Role.edit to not rely on previous role stateRapptz2021-06-291-33/+31
|
* Typehint Role and RoleTagsRapptz2021-05-281-48/+59
|
* Fix Role.is_assignable() computing Guild.me twiceRapptz2021-05-281-1/+6
|
* Check for guild owner in Role.is_assignable()TheOneMusic2021-05-281-1/+1
|
* Add Role.is_assignable()Tyler2021-05-281-0/+7
|
* Add warning for comparing with role positioningRapptz2021-05-271-0/+9
|
* Type up **kwargs of various methods Nadir Chowdhury2021-05-101-1/+21
|
* First pass at supporting v8 APIRapptz2021-04-111-1/+1
|
* Use f-strings in more places that were missed.Rapptz2021-04-081-7/+26
|
* Add `__all__` to remaining modulesNadir Chowdhury2021-04-071-0/+5
|
* Modernize code to use f-stringsRapptz2021-04-041-3/+1
| | | | | This also removes the encoding on the top, since Python 3 does it by default. It also changes some methods to use `yield from`.
* Add support for the new permission serialization scheme.Rapptz2021-02-181-2/+2
|
* Change copyright year to presentNihaal Sangha2021-01-151-1/+1
|
* Implement role tags.Rapptz2020-11-261-4/+78
| | | | | | | | | | | This comes with: * The RoleTags class * Role.is_premium_subscriber() * Role.is_bot_managed() * Role.is_integration() * Guild.self_role * Guild.premium_subscriber_role
* Fix and add documentationMichael2020-09-231-1/+1
|
* allow passing color int to role.editAnurag Singh2020-05-101-1/+7
|
* Fix documentation problem with colorSaurabh Chaturvedi2020-04-041-1/+4
| | | | At readthedocs.io, for role `color`, it says "Returns the role colour. An alias exists under `color`". This PR fixes that to say "Returns the role color. An alias exists under `colour`".
* Bump copyright year to 2020Rapptz2020-01-191-1/+1
| | | | Closes #2510
* Create Permissions and Colour objects when necessary in RoleRapptz2019-08-271-8/+15
| | | | | | | | | | This should have some memory savings of ~24 bytes per role. * 8 bytes for Permissions * 8 bytes for Colour * 8 bytes for the alias I'm not sure how significant it is but it should be a decent amount.
* Improve documentationNCPlayz2019-06-071-3/+3
|
* Organise documentationNCPlayz2019-03-191-6/+6
|
* 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