diff options
| author | El Laggron <[email protected]> | 2018-06-10 16:51:48 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-08-22 21:06:09 -0400 |
| commit | 395af228b17929159bbb9a33fee27e5d3a4fa067 (patch) | |
| tree | bca991827c366294d172f8ece6fe952bfe768d96 /discord | |
| parent | [commands] Handle nick mentions in HelpFormatter (diff) | |
| download | discord.py-395af228b17929159bbb9a33fee27e5d3a4fa067.tar.xz discord.py-395af228b17929159bbb9a33fee27e5d3a4fa067.zip | |
More informations for the Application info
This adds the rpc_origin, bot_public and
bot_require_code_grant attributes
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/client.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py index 7b0f4d34..9c1fdac2 100644 --- a/discord/client.py +++ b/discord/client.py @@ -50,7 +50,8 @@ from collections import namedtuple log = logging.getLogger(__name__) -AppInfo = namedtuple('AppInfo', 'id name description icon owner') +AppInfo = namedtuple('AppInfo', + 'id name description rpc_origins bot_public bot_require_code_grant icon owner') def app_info_icon_url(self): """Retrieves the application's icon_url if it exists. Empty string otherwise.""" @@ -962,8 +963,12 @@ class Client: Retrieving the information failed somehow. """ data = await self.http.application_info() + if 'rpc_origins' not in data: + data['rpc_origins'] = None return AppInfo(id=int(data['id']), name=data['name'], description=data['description'], icon=data['icon'], + rpc_origins=data['rpc_origins'], bot_public=data['bot_public'], + bot_require_code_grant=data['bot_require_code_grant'], owner=User(state=self._connection, data=data['owner'])) async def get_user_info(self, user_id): |