Commit Graph

29 Commits

Author SHA1 Message Date
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
fa158a5eba Add support for getting and editing integration_types_config application field 2025-02-17 20:21:19 -05:00
d578709640 Add approximate_user_install_count to AppInfo 2024-08-28 16:00:27 -04:00
692db7e9ab Add approximate_guild_count to AppInfo 2024-05-04 23:32:52 -04:00
56c67d3967 Implement editing application info 2023-11-20 04:33:56 -05:00
4828355f9e Change and add params in AppInfo and PartialAppInfo 2023-03-30 08:37:34 -04:00
9930c672bb Add AppInfo.role_connections_verification_url 2023-01-10 16:31:02 -05:00
cf031f71b9 Add a new extlink for discord documentation 2022-05-27 04:05:01 -04:00
96bada03f4 Add support for application tags and install params 2022-05-08 02:16:16 -04:00
cfdccbd5ff Add support for AppInfo.flags 2022-02-18 09:00:09 -05:00
18e7736f7b Remove PartialAppInfo.summary and AppInfo.summary
This is returning an empty String by Discord. and is planned to be fully
removed on v11 of the Discord API. See discord/discord-api-docs#4510.
2022-02-17 22:15:50 -05:00
ecf239d2a2 Fix user cache acting incorrectly with evictions
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.
2021-07-29 01:43:23 -04:00
233d10649c [docs] Update Sphinx and Fix various references
Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
2021-06-27 23:43:49 -04:00
04788d0a06 Type-Hint appinfo/team 2021-06-10 08:06:00 -04:00
b48f510e15 Add invite targets for voice channel invites 2021-05-29 00:15:46 -04:00
7bfb0f8133 [docs] fix docstring of AppInfo 2021-04-19 22:32:07 -04:00
aac0374baf Add privacy policy and tos fields to AppInfo 2021-04-17 23:52:46 -04:00
9eaf1e85e4 Rewrite Asset design
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.
2021-04-16 11:27:23 -04:00
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
89456022cf Add __all__ to remaining modules 2021-04-07 02:30:32 -04:00
9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
69bdc3a184 Change copyright year to present 2021-01-15 05:28:11 -05:00
2e2560126f Implement icon_rl_as and cover_image_url_as for AppInfo 2020-11-21 21:11:47 -05:00
6f9793fe5e Fixes and improvements for v1.3 documentation
* Add missing versionadded strings for v1.3
* Add missing versionchanged string for Message.edit
* Consistently use versionadded for attributes
* Consistently use versionchanged for parameters
* Use versionchanged for Bot.is_owner
* Fix references in v1.3 changelog
* Improve grammar in v1.3 changelog
2020-01-22 23:55:05 -05:00
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
3961e7ef6d Support team members data in application info 2019-06-29 19:14:24 -04:00
a62641bd65 Add back __repr__ that were deleted in the Asset redesign
The Asset PR (be227ebcf0) changed some namedtuple-deriving
classes to object-deriving classes, which meant that the free __repr__ provided by namedtuple
was removed
2019-05-13 20:29:08 -04:00
1da624a8b5 Remove manual documentation for AppInfo 2019-04-08 17:27:31 -04:00
be227ebcf0 Redesign asset retrieval in the library.
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
2019-04-06 19:12:50 -04:00