aboutsummaryrefslogtreecommitdiff
path: root/discord/invite.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix user cache acting incorrectly with evictionsRapptz2021-07-291-2/+2
| | | | | | | | | | | | | | 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.
* Fix a typo within the documentationxPolar2021-07-281-1/+1
|
* Refactor and type hint invitesRapptz2021-05-291-60/+105
|
* Add invite targets for voice channel invitesZomatree2021-05-291-4/+16
|
* Document Invite.inviter as optionalStanisław Jelnicki2021-05-121-1/+1
|
* Fix various reference issues in documentationJosh2021-05-061-1/+1
| | | | Co-Authored-By: Riley Shaw <[email protected]>
* Add fetch_invite with with_expirationNadir Chowdhury2021-05-011-17/+28
|
* Add target_user and target_type to Invite objectssudosnok2021-04-211-1/+14
|
* Rename lingering _url Asset properties Nadir Chowdhury2021-04-211-1/+1
|
* Rewrite Asset designRapptz2021-04-161-56/+19
| | | | | | | | | | | | | | | | | | | | | | | 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 typings for invites, templates, and bans Nadir Chowdhury2021-04-101-22/+35
|
* Use f-strings in more places that were missed.Rapptz2021-04-081-11/+29
|
* Add `__all__` to remaining modulesNadir Chowdhury2021-04-071-0/+6
|
* Convert datetimes to aware datetimes with UTC.Rapptz2021-04-041-1/+1
| | | | | Naive datetimes will now be interpreted as local time throughout the library.
* Convert two missing places to f-stringsRapptz2021-04-041-1/+1
|
* Modernize code to use f-stringsRapptz2021-04-041-2/+0
| | | | | This also removes the encoding on the top, since Python 3 does it by default. It also changes some methods to use `yield from`.
* Update docs for discord.Invite.max_usesxPolar2021-02-281-1/+3
| | | This mentions the unlimited uses aspect.
* Change copyright year to presentNihaal Sangha2021-01-151-1/+1
|
* Revert "Fix table wrapping"Rapptz2020-12-181-22/+17
| | | | This reverts commit c911cd0dbd06f6c0e774396174fb383fc63d172f.
* Fix table wrappingRapptz2020-12-181-17/+22
|
* Remove namedtuples to better future guard the libraryTarek2020-09-211-4/+11
|
* Documentation formattingSkezza2020-06-301-1/+1
|
* Fix various inconsistencies within the documentation (#5067)Sebastian Law2020-06-281-3/+21
|
* Change PartialInviteGuild.icon_url_as to mimic Guild.icon_url_asAnurag2020-06-261-2/+9
|
* Fix fetching invites on guilds the user is not inRapptz2020-01-251-1/+1
|
* Fix fetching invites for a GroupChannel.Rapptz2020-01-201-12/+23
| | | | | Closes #2394 Fixes #2383
* Bump copyright year to 2020Rapptz2020-01-191-1/+1
| | | | Closes #2510
* Add support for on_invite_create and on_invite_deleteRapptz2020-01-171-3/+19
|
* Adjust BASE urls to have no trailing slash (consistency)Devon R2019-11-151-2/+2
|
* Return invites as https, various URL normalizationDevon R2019-11-151-1/+3
|
* Improve documentationNCPlayz2019-06-071-10/+10
|
* Make __repr__ slightly more detailed and add a few missing ones.Rapptz2019-05-261-1/+3
| | | | | | This includes raw events (which didn't have any) and a few other types that were missing them. Upon review some more useful fields were added to the repr output which would be more useful during debugging.
* Add table showing what methods get invite attributes.Rapptz2019-05-191-1/+23
|
* Correct the documentation for methods and properties that return AssetsVexs2019-05-141-3/+3
|
* Add back __repr__ that were deleted in the Asset redesignBenjamin Mintz2019-05-131-0/+4
| | | | | | The Asset PR (be227ebcf0c8bad6b56798339b5414b8da414dc0) changed some namedtuple-deriving classes to object-deriving classes, which meant that the free __repr__ provided by namedtuple was removed
* Redesign asset retrieval in the library.NCPlayz2019-04-061-45/+23
| | | | | | | | | | | Most assets now return a new class named `Asset`. This allows for the assets to be consistently saved via a `save` method instead of special casing for `Attachment`. `AppInfo` is no longer a namedtuple it is a fully documented dataclass, as well as having the state attached to it. Fixes #1997
* Organise documentationNCPlayz2019-03-191-1/+1
|
* Add support for reading guild descriptionsNadir Chowdhury2019-03-131-2/+5
| | | Added `Guild.description` and `PartialInviteGuild.description`.
* Fix importsNadir Chowdhury2019-03-131-4/+4
| | | | Removed unnecessary Object import. Added `snowflake_time` and `InvalidArgument`
* Add support for guild bannersSnowyLuma2019-03-091-3/+23
| | | | | | | | Document banner attribute of Guild and Invite Update discord/utils.py Co-Authored-By: SnowyLuma <[email protected]>
* Fix missing importsRapptz2019-02-121-1/+3
|
* Expose more information from partial invites, along with counts.Rapptz2019-02-121-14/+156
| | | | | | | | | | | | | This adds the following information. * `PartialInviteGuild` to replace `Object` patching * `PartialInviteChannel` to replace `Object` patching * Invite.approximate_member_count and Invite.approximate_presence_count The new partial objects provide better documentation on what is expected when you fetch random invites. Fixes #1830
* Bumped copyright years to 2019.Dante Dam2019-01-281-1/+1
|
* [lint] Fix incorrect and inconsistent whitespaceHornwitser2018-08-221-2/+2
| | | | 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.
* Add support for splash(_url) to invitesDismissedGuy2018-08-221-0/+6
|
* Drop support for Python 3.4 and make minimum version 3.5.2.Rapptz2018-06-101-3/+2
|
* Fixes various documentation errors/inconsistenciesSteve C2018-05-181-0/+2
| | | | Mostly dealing with permissions, also fixes Raw Events inclusion.
* Add intersphinxTobotimus2018-01-061-6/+6
|
* Fix __hash__ for Invite objects.Rapptz2017-09-041-0/+3
|