Skip to content

Commit

Permalink
Add approximate_guild_count to AppInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
fretgfr committed May 5, 2024
1 parent ef64f76 commit 692db7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions discord/appinfo.py
Expand Up @@ -142,6 +142,10 @@ class AppInfo:
redirect_uris: List[:class:`str`]
A list of authentication redirect URIs.
.. versionadded:: 2.4
approximate_guild_count: :class:`int`
The approximate count of the guilds the bot was added to.
.. versionadded:: 2.4
"""

Expand Down Expand Up @@ -170,6 +174,7 @@ class AppInfo:
'role_connections_verification_url',
'interactions_endpoint_url',
'redirect_uris',
'approximate_guild_count',
)

def __init__(self, state: ConnectionState, data: AppInfoPayload):
Expand Down Expand Up @@ -206,6 +211,7 @@ def __init__(self, state: ConnectionState, data: AppInfoPayload):
self.install_params: Optional[AppInstallParams] = AppInstallParams(params) if params else None
self.interactions_endpoint_url: Optional[str] = data.get('interactions_endpoint_url')
self.redirect_uris: List[str] = data.get('redirect_uris', [])
self.approximate_guild_count: int = data.get('approximate_guild_count', 0)

def __repr__(self) -> str:
return (
Expand Down

0 comments on commit 692db7e

Please sign in to comment.