From 61ee1ef88ea66574f977e89acb8b46226e76eb33 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:21:42 -0700 Subject: [PATCH 01/19] feat: add missing AppInfo attributes --- discord/appinfo.py | 42 ++++++++++++++++++++++++++++++++++++++++ discord/types/appinfo.py | 5 +++++ 2 files changed, 47 insertions(+) diff --git a/discord/appinfo.py b/discord/appinfo.py index 9554c96b5d..ef26e60e06 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -29,6 +29,7 @@ from . import utils from .asset import Asset +from .permissions import Permissions if TYPE_CHECKING: from .guild import Guild @@ -36,6 +37,7 @@ from .types.appinfo import AppInfo as AppInfoPayload from .types.appinfo import PartialAppInfo as PartialAppInfoPayload from .types.appinfo import Team as TeamPayload + from .types.appinfo import AppInstallParams as AppInstallParamsPayload from .user import User __all__ = ( @@ -76,6 +78,8 @@ class AppInfo: .. versionadded:: 1.3 + .. deprecated:: 2.7 + verify_key: :class:`str` The hex encoded key for verification in interactions and the GameSDK's `GetTicket `_. @@ -131,6 +135,13 @@ class AppInfo: "_cover_image", "terms_of_service_url", "privacy_policy_url", + "approximate_guild_count", + "approximate_user_install_count", + "redirect_uris", + "interactions.endpoint_url", + "role_connections_verification_url", + "tags", + "custom_install_url", ) def __init__(self, state: ConnectionState, data: AppInfoPayload): @@ -161,6 +172,17 @@ def __init__(self, state: ConnectionState, data: AppInfoPayload): self._cover_image: str | None = data.get("cover_image") self.terms_of_service_url: str | None = data.get("terms_of_service_url") self.privacy_policy_url: str | None = data.get("privacy_policy_url") + self.approximate_guild_count: int | None = data.get("approximate_guild_count") + self.approximate_user_install_count: int | None = data.get("approximate_user_install_count") + self.redirect_uris: list[str] | None = data.get("redirect_uris") + self.interactions_endpoint_url: str | None = data.get("interactions_endpoint_url") + self.role_connections_verification_url: str | None = data.get("role_connections_verification_url") + + install_params = data.get("install_params") + self.install_params: AppInstallParams | None = AppInstallParams(install_params) if install_params else None + self.tags: str | None = data.get("tags", []) + self.custom_install_url: str | None = data.get("custom_install_url") + def __repr__(self) -> str: return ( @@ -257,3 +279,23 @@ def icon(self) -> Asset | None: if self._icon is None: return None return Asset._from_icon(self._state, self.id, self._icon, path="app") + + +class AppInstallParams: + """Represents the settings for the custom authorization URL of an application. + + .. versionadded:: 2.7 + + Attributes + ---------- + scopes: List[:class:`str`] + The list of OAuth2 scopes for adding the application to a guild. + permissions: :class:`Permissions` + The permissions to request for the bot role in the guild. + """ + + __slots__ = ('scopes', 'permissions') + + def __init__(self, data: AppInstallParamsPayload) -> None: + self.scopes: list[str] = data.get('scopes', []) + self.permissions: Permissions = Permissions(int(data['permissions'])) diff --git a/discord/types/appinfo.py b/discord/types/appinfo.py index 989d3f7a58..abec7adfa9 100644 --- a/discord/types/appinfo.py +++ b/discord/types/appinfo.py @@ -59,3 +59,8 @@ class PartialAppInfo(BaseAppInfo): rpc_origins: NotRequired[list[str]] cover_image: NotRequired[str] flags: NotRequired[int] + + +class AppInstallParams(TypedDict): + scopes: List[str] + permissions: str From 52f77c316826bc7229eb405f4b54dace99021019 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:22:29 -0700 Subject: [PATCH 02/19] fix: add `install_params` to slots --- discord/appinfo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/appinfo.py b/discord/appinfo.py index ef26e60e06..387527648b 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -140,6 +140,7 @@ class AppInfo: "redirect_uris", "interactions.endpoint_url", "role_connections_verification_url", + "install_params", "tags", "custom_install_url", ) From b0a242325b580d5b7e9d091cbb8ebbd246c3dc9d Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:33:49 -0700 Subject: [PATCH 03/19] docs: add related documentation --- discord/appinfo.py | 43 ++++++++++++++++++++++++++++++++++- docs/api/application_info.rst | 5 ++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index 387527648b..6aab8bd0ef 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -114,6 +114,47 @@ class AppInfo: The application's privacy policy URL, if set. .. versionadded:: 2.0 + + approximate_guild_count: Optional[:class:`int`] + The approximate count of guilds to which the app has been added, if any. + + .. versionadded:: 2.7 + + approximate_user_install_count: Optional[:class:`int`] + The approximate count of users who have installed the application, if any. + + .. versionadded:: 2.7 + + redirect_uris: Optional[List[:class:`str`]] + The list of redirect URIs for the application, if set. + + .. versionadded:: 2.7 + + interactions_endpoint_url: Optional[`str`] + The interactions endpoint URL for the application, if set. + + .. versionadded:: 2.7 + + role_connections_verification_url: Optional[`str`] + The role connection verification URL for the application, if set. + + .. versionadded:: 2.7 + + install_params: Optional[List[`AppInstallParams`]] + The settings for the application's default in-app authorization link, if set. + + .. versionadded:: 2.7 + + tags: Optional[`str`] + The list of tags describing the content and functionality of the app, if set. + + Maximium of 5 tags. + + .. versionadded:: 2.7 + custom_install_url: Optional[`str`] + The default custom authorization URL for the application, if set. + + .. versionadded:: 2.7 """ __slots__ = ( @@ -138,7 +179,7 @@ class AppInfo: "approximate_guild_count", "approximate_user_install_count", "redirect_uris", - "interactions.endpoint_url", + "interactions_endpoint_url", "role_connections_verification_url", "install_params", "tags", diff --git a/docs/api/application_info.rst b/docs/api/application_info.rst index a0fe725320..585902b3a4 100644 --- a/docs/api/application_info.rst +++ b/docs/api/application_info.rst @@ -13,6 +13,11 @@ Application Info .. autoclass:: PartialAppInfo() :members: +.. attributetable:: AppInstallParams + +.. autoclass:: AppInstallParams() + :members: + .. attributetable:: Team .. autoclass:: Team() From 7cff3a31dd4460f60f5f3b71ff18cb69364e0777 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:36:10 +0000 Subject: [PATCH 04/19] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/appinfo.py | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index 6aab8bd0ef..d107b8a9bf 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -35,9 +35,9 @@ from .guild import Guild from .state import ConnectionState from .types.appinfo import AppInfo as AppInfoPayload + from .types.appinfo import AppInstallParams as AppInstallParamsPayload from .types.appinfo import PartialAppInfo as PartialAppInfoPayload from .types.appinfo import Team as TeamPayload - from .types.appinfo import AppInstallParams as AppInstallParamsPayload from .user import User __all__ = ( @@ -114,40 +114,40 @@ class AppInfo: The application's privacy policy URL, if set. .. versionadded:: 2.0 - + approximate_guild_count: Optional[:class:`int`] The approximate count of guilds to which the app has been added, if any. .. versionadded:: 2.7 - + approximate_user_install_count: Optional[:class:`int`] The approximate count of users who have installed the application, if any. .. versionadded:: 2.7 - + redirect_uris: Optional[List[:class:`str`]] The list of redirect URIs for the application, if set. .. versionadded:: 2.7 - + interactions_endpoint_url: Optional[`str`] The interactions endpoint URL for the application, if set. .. versionadded:: 2.7 - + role_connections_verification_url: Optional[`str`] The role connection verification URL for the application, if set. .. versionadded:: 2.7 - + install_params: Optional[List[`AppInstallParams`]] The settings for the application's default in-app authorization link, if set. .. versionadded:: 2.7 - + tags: Optional[`str`] - The list of tags describing the content and functionality of the app, if set. - + The list of tags describing the content and functionality of the app, if set. + Maximium of 5 tags. .. versionadded:: 2.7 @@ -215,17 +215,24 @@ def __init__(self, state: ConnectionState, data: AppInfoPayload): self.terms_of_service_url: str | None = data.get("terms_of_service_url") self.privacy_policy_url: str | None = data.get("privacy_policy_url") self.approximate_guild_count: int | None = data.get("approximate_guild_count") - self.approximate_user_install_count: int | None = data.get("approximate_user_install_count") + self.approximate_user_install_count: int | None = data.get( + "approximate_user_install_count" + ) self.redirect_uris: list[str] | None = data.get("redirect_uris") - self.interactions_endpoint_url: str | None = data.get("interactions_endpoint_url") - self.role_connections_verification_url: str | None = data.get("role_connections_verification_url") + self.interactions_endpoint_url: str | None = data.get( + "interactions_endpoint_url" + ) + self.role_connections_verification_url: str | None = data.get( + "role_connections_verification_url" + ) install_params = data.get("install_params") - self.install_params: AppInstallParams | None = AppInstallParams(install_params) if install_params else None + self.install_params: AppInstallParams | None = ( + AppInstallParams(install_params) if install_params else None + ) self.tags: str | None = data.get("tags", []) self.custom_install_url: str | None = data.get("custom_install_url") - def __repr__(self) -> str: return ( f"<{self.__class__.__name__} id={self.id} name={self.name!r} " @@ -336,8 +343,8 @@ class AppInstallParams: The permissions to request for the bot role in the guild. """ - __slots__ = ('scopes', 'permissions') + __slots__ = ("scopes", "permissions") def __init__(self, data: AppInstallParamsPayload) -> None: - self.scopes: list[str] = data.get('scopes', []) - self.permissions: Permissions = Permissions(int(data['permissions'])) + self.scopes: list[str] = data.get("scopes", []) + self.permissions: Permissions = Permissions(int(data["permissions"])) From aa879a4b7578dda9f5b08eb047cade6bf02d3bbf Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:38:43 -0700 Subject: [PATCH 05/19] fix: typing --- discord/appinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index d107b8a9bf..2c5e19be6c 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -218,7 +218,7 @@ def __init__(self, state: ConnectionState, data: AppInfoPayload): self.approximate_user_install_count: int | None = data.get( "approximate_user_install_count" ) - self.redirect_uris: list[str] | None = data.get("redirect_uris") + self.redirect_uris: list[str] | None = data.get("redirect_uris", []) self.interactions_endpoint_url: str | None = data.get( "interactions_endpoint_url" ) @@ -230,7 +230,7 @@ def __init__(self, state: ConnectionState, data: AppInfoPayload): self.install_params: AppInstallParams | None = ( AppInstallParams(install_params) if install_params else None ) - self.tags: str | None = data.get("tags", []) + self.tags: list[str] | None = data.get("tags", []) self.custom_install_url: str | None = data.get("custom_install_url") def __repr__(self) -> str: From d244d5d689b28c286bc6d4b979982a937af10869 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:39:06 -0700 Subject: [PATCH 06/19] docs: fix spacing --- discord/appinfo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/appinfo.py b/discord/appinfo.py index 2c5e19be6c..cf925d6ca1 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -151,6 +151,7 @@ class AppInfo: Maximium of 5 tags. .. versionadded:: 2.7 + custom_install_url: Optional[`str`] The default custom authorization URL for the application, if set. From 56ad873cad57b62810a31850e588fb8fea1441e1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:39:26 +0000 Subject: [PATCH 07/19] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/appinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index cf925d6ca1..b1049a37e6 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -151,7 +151,7 @@ class AppInfo: Maximium of 5 tags. .. versionadded:: 2.7 - + custom_install_url: Optional[`str`] The default custom authorization URL for the application, if set. From 681788c575d82c6c36b9004ff6f041ead1e5f90e Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Fri, 9 Aug 2024 20:44:37 -0700 Subject: [PATCH 08/19] fix: add AppInstallParams to `__all__` --- discord/appinfo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/appinfo.py b/discord/appinfo.py index b1049a37e6..3a11bae8ad 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -43,6 +43,7 @@ __all__ = ( "AppInfo", "PartialAppInfo", + "AppInstallParams", ) From 239120a4006cf2d23d4b367716871566b4387209 Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Fri, 9 Aug 2024 20:46:34 -0700 Subject: [PATCH 09/19] fix: invalid scopes typehint --- discord/types/appinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/types/appinfo.py b/discord/types/appinfo.py index abec7adfa9..8d891acbed 100644 --- a/discord/types/appinfo.py +++ b/discord/types/appinfo.py @@ -62,5 +62,5 @@ class PartialAppInfo(BaseAppInfo): class AppInstallParams(TypedDict): - scopes: List[str] + scopes: list[str] permissions: str From 27ee402a853717abe831965f7cda38000617863a Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Fri, 9 Aug 2024 20:52:31 -0700 Subject: [PATCH 10/19] fix: docs types formatting --- discord/appinfo.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index 3a11bae8ad..f5e38b503a 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -131,29 +131,29 @@ class AppInfo: .. versionadded:: 2.7 - interactions_endpoint_url: Optional[`str`] + interactions_endpoint_url: Optional[:class:`str`] The interactions endpoint URL for the application, if set. .. versionadded:: 2.7 - role_connections_verification_url: Optional[`str`] + role_connections_verification_url: Optional[:class:`str`] The role connection verification URL for the application, if set. .. versionadded:: 2.7 - install_params: Optional[List[`AppInstallParams`]] + install_params: Optional[List[:class:`AppInstallParams`]] The settings for the application's default in-app authorization link, if set. .. versionadded:: 2.7 - tags: Optional[`str`] + tags: Optional[:class:`str`] The list of tags describing the content and functionality of the app, if set. Maximium of 5 tags. .. versionadded:: 2.7 - custom_install_url: Optional[`str`] + custom_install_url: Optional[:class:`str`] The default custom authorization URL for the application, if set. .. versionadded:: 2.7 From 06a5eca0a4abd68e272d4865dd09c4d969560937 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Sun, 11 Aug 2024 19:11:50 -0700 Subject: [PATCH 11/19] docs: add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bd37dd602..457688ac61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ These changes are available on the `master` branch, but have not yet been releas `ScheduledEvent.edit` to `image`. ([#2496](https://github.com/Pycord-Development/pycord/pull/2496)) +### Added + +- Added `AppInfo` attributes. ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) + ## [2.6.0] - 2024-07-09 ### Added From 4def83de2d7471ce07c2a7a8c44e2c715c67b4ab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 02:12:09 +0000 Subject: [PATCH 12/19] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 457688ac61..bbc2d6c779 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,8 @@ These changes are available on the `master` branch, but have not yet been releas ### Added -- Added `AppInfo` attributes. ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) +- Added `AppInfo` attributes. + ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) ## [2.6.0] - 2024-07-09 From d79de906d6e5ffe3960a4b8a82be240f910fdd34 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:26:27 -0700 Subject: [PATCH 13/19] feat: deprecate `AppInfo.summary` --- discord/appinfo.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index f5e38b503a..bda3e3094a 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -73,13 +73,6 @@ class AppInfo: grant flow to join. rpc_origins: Optional[List[:class:`str`]] A list of RPC origin URLs, if RPC is enabled. - summary: :class:`str` - If this application is a game sold on Discord, - this field will be the summary field for the store page of its primary SKU. - - .. versionadded:: 1.3 - - .. deprecated:: 2.7 verify_key: :class:`str` The hex encoded key for verification in interactions and the @@ -169,7 +162,7 @@ class AppInfo: "bot_require_code_grant", "owner", "_icon", - "summary", + "_summary", "verify_key", "team", "guild_id", @@ -204,7 +197,7 @@ def __init__(self, state: ConnectionState, data: AppInfoPayload): team: TeamPayload | None = data.get("team") self.team: Team | None = Team(state, team) if team else None - self.summary: str = data["summary"] + self._summary: str = data["summary"] self.verify_key: str = data["verify_key"] self.guild_id: int | None = utils._get_as_snowflake(data, "guild_id") @@ -267,6 +260,23 @@ def guild(self) -> Guild | None: .. versionadded:: 1.3 """ return self._state._get_guild(self.guild_id) + + @property + def summary(self) -> str | None: + """summary: :class:`str` + If this application is a game sold on Discord, + this field will be the summary field for the store page of its primary SKU. + + It currently returns an empty string. + + .. versionadded:: 1.3 + + .. deprecated:: 2.7""" + utils.warn_deprecated( + "summary", + reference="https://discord.com/developers/docs/resources/application#application-object-application-structure" + ); + return self._summary; class PartialAppInfo: From 0a0cd4ce1b9d9af18c58c0b82c90f245f57c88c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:26:48 +0000 Subject: [PATCH 14/19] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/appinfo.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index bda3e3094a..a94684d5db 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -260,7 +260,7 @@ def guild(self) -> Guild | None: .. versionadded:: 1.3 """ return self._state._get_guild(self.guild_id) - + @property def summary(self) -> str | None: """summary: :class:`str` @@ -270,13 +270,13 @@ def summary(self) -> str | None: It currently returns an empty string. .. versionadded:: 1.3 - - .. deprecated:: 2.7""" + .. deprecated:: 2.7 + """ utils.warn_deprecated( - "summary", - reference="https://discord.com/developers/docs/resources/application#application-object-application-structure" - ); - return self._summary; + "summary", + reference="https://discord.com/developers/docs/resources/application#application-object-application-structure", + ) + return self._summary class PartialAppInfo: From 2ea37c0458a3c82245c291c4cd903cb9ae200c09 Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Wed, 14 Aug 2024 19:19:24 -0700 Subject: [PATCH 15/19] docs: fix changelog to adhere to conventions --- CHANGELOG.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a96af1289a..3f07defd49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ These changes are available on the `master` branch, but have not yet been releas ⚠️ **This Version Removes Support For Python 3.8** ⚠️ +### Added + +- Added `Guild.fetch_role` method. + ([#2528](https://github.com/Pycord-Development/pycord/pull/2528)) +- Added the following `AppInfo` attributes: `approximate_guild_count`, `approximate_user_install_count`, `custom_install_url`, `install_params`, `interactions_endpoint_url`, `redirect_uris`, `role_connections_verification_url`, and `tags`. + ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) + ### Changed - Renamed `cover` property of `ScheduledEvent` and `cover` argument of @@ -20,11 +27,7 @@ These changes are available on the `master` branch, but have not yet been releas - ⚠️ **This Version Removes Support For Python 3.8** ⚠️ ([#2521](https://github.com/Pycord-Development/pycord/pull/2521)) -### Added -- Added `Guild.fetch_role` method. - ([#2528](https://github.com/Pycord-Development/pycord/pull/2528)) -- Added `AppInfo` attributes. ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) ## [2.6.0] - 2024-07-09 From c987ab5a653f3fa258f2990e423e4f4b5340ac24 Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Wed, 14 Aug 2024 19:19:47 -0700 Subject: [PATCH 16/19] fix: properly deprecate `summary` --- CHANGELOG.md | 2 ++ discord/appinfo.py | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f07defd49..b24a1130bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,9 @@ These changes are available on the `master` branch, but have not yet been releas - ⚠️ **This Version Removes Support For Python 3.8** ⚠️ ([#2521](https://github.com/Pycord-Development/pycord/pull/2521)) +### Deprecated +- Deprecated `AppInfo.summary` in favor of `AppInfo.description`. ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) ## [2.6.0] - 2024-07-09 diff --git a/discord/appinfo.py b/discord/appinfo.py index a94684d5db..2b10d8977e 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -274,6 +274,7 @@ def summary(self) -> str | None: """ utils.warn_deprecated( "summary", + "description", reference="https://discord.com/developers/docs/resources/application#application-object-application-structure", ) return self._summary From a62d3015520744c491e47332cb985a09e0ddf4f3 Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Wed, 14 Aug 2024 19:20:13 -0700 Subject: [PATCH 17/19] docs: fix `tags` typing --- discord/appinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index 2b10d8977e..73833e3079 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -139,7 +139,7 @@ class AppInfo: .. versionadded:: 2.7 - tags: Optional[:class:`str`] + tags: Optional[List[:class:`str`]] The list of tags describing the content and functionality of the app, if set. Maximium of 5 tags. From 626bf3c01affef79157b4e944834db3cd7da883a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 02:21:09 +0000 Subject: [PATCH 18/19] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b24a1130bb..f5ab9b9462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,10 @@ These changes are available on the `master` branch, but have not yet been releas - Added `Guild.fetch_role` method. ([#2528](https://github.com/Pycord-Development/pycord/pull/2528)) -- Added the following `AppInfo` attributes: `approximate_guild_count`, `approximate_user_install_count`, `custom_install_url`, `install_params`, `interactions_endpoint_url`, `redirect_uris`, `role_connections_verification_url`, and `tags`. - ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) +- Added the following `AppInfo` attributes: `approximate_guild_count`, + `approximate_user_install_count`, `custom_install_url`, `install_params`, + `interactions_endpoint_url`, `redirect_uris`, `role_connections_verification_url`, and + `tags`. ([#2520](https://github.com/Pycord-Development/pycord/pull/2520)) ### Changed From ea13c49d5994c25ad3ca699262eb2a0ac63ee30a Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Wed, 14 Aug 2024 19:40:54 -0700 Subject: [PATCH 19/19] docs: fix summary formatting --- discord/appinfo.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/discord/appinfo.py b/discord/appinfo.py index 73833e3079..034b1bb158 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -263,8 +263,7 @@ def guild(self) -> Guild | None: @property def summary(self) -> str | None: - """summary: :class:`str` - If this application is a game sold on Discord, + """If this application is a game sold on Discord, this field will be the summary field for the store page of its primary SKU. It currently returns an empty string.