Browse Source

Add approximate_guild_count to AppInfo

pull/9556/merge
fretgfr 11 months ago
committed by GitHub
parent
commit
692db7e9ab
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      discord/appinfo.py

6
discord/appinfo.py

@ -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
"""
@ -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):
@ -206,6 +211,7 @@ class AppInfo:
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 (

Loading…
Cancel
Save