mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-22 19:06:44 +00:00
Add approximate_user_install_count to AppInfo
This commit is contained in:
parent
9ab938a9ea
commit
d578709640
@ -147,6 +147,10 @@ class AppInfo:
|
|||||||
The approximate count of the guilds the bot was added to.
|
The approximate count of the guilds the bot was added to.
|
||||||
|
|
||||||
.. versionadded:: 2.4
|
.. versionadded:: 2.4
|
||||||
|
approximate_user_install_count: Optional[:class:`int`]
|
||||||
|
The approximate count of the user-level installations the bot has.
|
||||||
|
|
||||||
|
.. versionadded:: 2.5
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__slots__ = (
|
||||||
@ -175,6 +179,7 @@ class AppInfo:
|
|||||||
'interactions_endpoint_url',
|
'interactions_endpoint_url',
|
||||||
'redirect_uris',
|
'redirect_uris',
|
||||||
'approximate_guild_count',
|
'approximate_guild_count',
|
||||||
|
'approximate_user_install_count',
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, state: ConnectionState, data: AppInfoPayload):
|
def __init__(self, state: ConnectionState, data: AppInfoPayload):
|
||||||
@ -212,6 +217,7 @@ class AppInfo:
|
|||||||
self.interactions_endpoint_url: Optional[str] = data.get('interactions_endpoint_url')
|
self.interactions_endpoint_url: Optional[str] = data.get('interactions_endpoint_url')
|
||||||
self.redirect_uris: List[str] = data.get('redirect_uris', [])
|
self.redirect_uris: List[str] = data.get('redirect_uris', [])
|
||||||
self.approximate_guild_count: int = data.get('approximate_guild_count', 0)
|
self.approximate_guild_count: int = data.get('approximate_guild_count', 0)
|
||||||
|
self.approximate_user_install_count: Optional[int] = data.get('approximate_user_install_count')
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return (
|
return (
|
||||||
|
@ -45,6 +45,7 @@ class BaseAppInfo(TypedDict):
|
|||||||
summary: str
|
summary: str
|
||||||
description: str
|
description: str
|
||||||
flags: int
|
flags: int
|
||||||
|
approximate_user_install_count: NotRequired[int]
|
||||||
cover_image: NotRequired[str]
|
cover_image: NotRequired[str]
|
||||||
terms_of_service_url: NotRequired[str]
|
terms_of_service_url: NotRequired[str]
|
||||||
privacy_policy_url: NotRequired[str]
|
privacy_policy_url: NotRequired[str]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user