28 Commits

Author SHA1 Message Date
Soheab
fa158a5eba
Add support for getting and editing integration_types_config application field 2025-02-17 20:21:19 -05:00
Alex Nørgaard
d578709640
Add approximate_user_install_count to AppInfo 2024-08-28 16:00:27 -04:00
fretgfr
692db7e9ab
Add approximate_guild_count to AppInfo 2024-05-04 23:32:52 -04:00
Andrin
56c67d3967
Implement editing application info 2023-11-20 04:33:56 -05:00
Andrin S
4828355f9e
Change and add params in AppInfo and PartialAppInfo 2023-03-30 08:37:34 -04:00
Rapptz
9930c672bb Add AppInfo.role_connections_verification_url 2023-01-10 16:31:02 -05:00
Rapptz
cf031f71b9 Add a new extlink for discord documentation 2022-05-27 04:05:01 -04:00
I. Ahmad
96bada03f4
Add support for application tags and install params 2022-05-08 02:16:16 -04:00
Rapptz
cfdccbd5ff Add support for AppInfo.flags 2022-02-18 09:00:09 -05:00
Kowlin
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
Rapptz
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
Josh
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
Josh
04788d0a06
Type-Hint appinfo/team 2021-06-10 08:06:00 -04:00
Zomatree
b48f510e15
Add invite targets for voice channel invites 2021-05-29 00:15:46 -04:00
Nadir Chowdhury
7bfb0f8133
[docs] fix docstring of AppInfo 2021-04-19 22:32:07 -04:00
Zomatree
aac0374baf
Add privacy policy and tos fields to AppInfo 2021-04-17 23:52:46 -04:00
Rapptz
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
Rapptz
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
Nadir Chowdhury
89456022cf
Add __all__ to remaining modules 2021-04-07 02:30:32 -04:00
Rapptz
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
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
SebbyLaw
2e2560126f Implement icon_rl_as and cover_image_url_as for AppInfo 2020-11-21 21:11:47 -05:00
Harmon
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
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
fourjr
3961e7ef6d Support team members data in application info 2019-06-29 19:14:24 -04:00
Benjamin Mintz
a62641bd65 Add back __repr__ that were deleted in the Asset redesign
The Asset PR (be227ebcf0c8bad6b56798339b5414b8da414dc0) 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
Rapptz
1da624a8b5 Remove manual documentation for AppInfo 2019-04-08 17:27:31 -04:00
NCPlayz
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