aboutsummaryrefslogtreecommitdiff
path: root/discord/member.py
Commit message (Collapse)AuthorAgeFilesLines
* Make arguments positional only in 2 get methodsIzhar Ahmad2021-08-251-1/+1
| | | | - Member.get_role - Guild.get_member
* Change User.avatar to be Optional[Asset] instead of AssetRapptz2021-08-251-2/+2
| | | | | | | | | | | This change was needed to allow users to more easily check if an uploaded avatar was set using `if user.avatar:` rather than the admittedly clunky `if user.avatar != user.default_avatar. The old behaviour with a fallback is still useful for actual display purposes, so it has been moved over to the new `User.display_avatar` attribute. This also has symmetry with the newly added `Member.display_avatar` attribute.
* Remove in-place edits and return fresh instances insteadRapptz2021-08-231-2/+12
| | | | Fixes #4098
* Fix typings for member HTTP methodsRapptz2021-08-231-2/+2
|
* Fix Member.guild_avatar docstringRapptz2021-08-221-2/+2
|
* Fix Member._avatar not updating in member update eventsRapptz2021-08-221-1/+3
|
* Add per-guild member avatar supportJustAnyone2021-08-221-0/+26
| | | Fix #7054
* Add missing typehints for Member propertiesArnav Jindal2021-08-211-0/+3
|
* Re-define Member properties inferred from User to support type-checkingJosh2021-08-201-6/+8
|
* Rename instances of nitro to premiumRapptz2021-07-301-1/+1
|
* Fix user cache acting incorrectly with evictionsRapptz2021-07-291-1/+1
| | | | | | | | | | | | | | The first issue involved copied users which would lead to user updates causing faster evictions of the cache than was expected. The second issue involved users that weren't bound to an internal lifetime eviction policy. These users would not get evicted. For example, a user without mutual guilds or being part of the internal cache in general (messages, DMs) would never end up being evicted for some strange reason. To handle this case, store_user would get a counterpart named create_user which would create a user without potentially storing them in the cache. That way only users with a bound lifetime within the library would be stored.
* Use a specific tag type for member and user comparisonsRapptz2021-07-081-5/+3
| | | | | | The previous protocol based tag type caused significant overhead (in the magnitude of seconds). Removing this should simplify object creation by removing typing.Generic from the __mro__
* Typehint Member and various typing fixesRapptz2021-06-301-102/+144
|
* Rework Member.edit to not use kwargs for better typingRapptz2021-06-291-42/+18
|
* Fix Member.ban typing to include 0-day message deletesSteve C2021-06-271-1/+1
|
* Add Member.get_role Michael H2021-05-271-0/+17
| | | | | | | | | Adds an efficient way to check if a member has a role by ID. This is done in a way consistent with the existing user API of the library. The more debated Member.has_role_id/has_role is intentionally not included for review at this time given the heavy bikeshedding of it.
* Fix issues with imports causing NameErrorsJosh2021-05-121-0/+2
|
* Type up **kwargs of various methods Nadir Chowdhury2021-05-101-6/+43
|
* `activities` is no longer nullableNadir Chowdhury2021-04-171-2/+2
|
* Rewrite Asset designRapptz2021-04-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This is a breaking change. This does the following transformations, assuming `asset` represents an asset type. Object.is_asset_animated() => Object.asset.is_animated() Object.asset => Object.asset.key Object.asset_url => Object.asset_url Object.asset_url_as => Object.asset.replace(...) Since the asset type now requires a key (or hash, if you will), Emoji had to be flattened similar to how Attachment was done since these assets are keyed solely ID. Emoji.url (Asset) => Emoji.url (str) Emoji.url_as => removed Emoji.url.read => Emoji.read Emoji.url.save => Emoji.save This transformation was also done to PartialEmoji.
* Add note to member docs about Spotify limitationnumbermaniac2021-04-141-0/+13
|
* Remove User.permissions_inRapptz2021-04-111-23/+1
| | | | This seemed to only cause confusion.
* Remove Member related handling in PRESENCE_UPDATERapptz2021-04-111-11/+0
|
* Add `__all__` to remaining modulesNadir Chowdhury2021-04-071-0/+5
|
* Convert datetimes to aware datetimes with UTC.Rapptz2021-04-041-3/+3
| | | | | Naive datetimes will now be interpreted as local time throughout the library.
* Modernize code to use f-stringsRapptz2021-04-041-8/+7
| | | | | This also removes the encoding on the top, since Python 3 does it by default. It also changes some methods to use `yield from`.
* Implement StageChannel and related methodsNadir Chowdhury2021-04-031-5/+90
|
* [docs] copy signature from overridden and inherited methodsSebastian Law2021-03-291-1/+1
|
* Make `await` text appear in async Member method docsSebastian Law2021-03-241-2/+8
|
* Code optimisations and refactoring via SourceryNadir Chowdhury2021-02-241-7/+3
|
* Fix User public flags not updatingLucas2021-01-171-3/+3
|
* Change copyright year to presentNihaal Sangha2021-01-151-1/+1
|
* Update add_roles docstring to mention role order.Perry Cate2021-01-141-2/+4
|
* Add support for Member.pending boolean attributeRapptz2020-12-181-1/+13
|
* [chore] Remove redundant importsNadir Chowdhury2020-11-281-1/+1
| | | This also removes the historical patch for NullHandler implemented in bbf1c54, as it has been available since Python 3.1.
* Intern status and overwrite stringsRapptz2020-09-231-4/+5
|
* Allow finer grained control over the member cache.Rapptz2020-09-231-0/+8
|
* Handle user updates within GUILD_MEMBER_UPDATERapptz2020-09-231-9/+12
|
* Fix and add documentationMichael2020-09-231-1/+6
|
* Completely update member references from message inner members.Rapptz2020-09-171-1/+7
| | | | Fixes #5819
* Fix Member.joined_at documentationrodovia2020-09-091-2/+2
|
* Documentation formattingSkezza2020-06-301-2/+2
|
* Fix various inconsistencies within the documentation (#5067)Sebastian Law2020-06-281-2/+7
|
* Removes the caching behavior of Member.rolesMichael H2020-06-041-12/+7
| | | | | | - fixes 4087 - This intentionally uses some internals in both Member.roles and Member.top_role to retain as much performance as possible while removing the cache
* Add support for public user flagsJohnyTheCarrot2020-05-291-1/+1
|
* Fix colour properties being displayed as methods in the documentation.kittenswolf2020-05-031-2/+2
|
* Drop superfluous zero in version related changes in the documentationRapptz2020-01-211-3/+3
|
* Bump copyright year to 2020Rapptz2020-01-191-1/+1
| | | | Closes #2510
* Expose _ActivityTag as BaseActivity to easily refer to.Rapptz2020-01-141-2/+2
|
* Cache member.roles access to avoid surprising performance trapsRapptz2020-01-061-2/+12
| | | | | Without the cache, repeated access could be accidentally quadratic or worse.