Add Client.application_info to retrieve the current app info.

Fixes #241.
This commit is contained in:
Rapptz
2016-06-10 22:28:15 -04:00
parent fe5c369fe9
commit a175c86aa1
4 changed files with 66 additions and 2 deletions

View File

@ -31,7 +31,6 @@ There are two main ways to query version information about the library.
A string representation of the version. e.g. ``'0.10.0-alpha0'``.
Client
-------
@ -345,6 +344,31 @@ Utility Functions
.. autofunction:: discord.utils.oauth_url
Application Info
------------------
.. class:: AppInfo
A namedtuple representing the bot's application info.
.. attribute:: id
The application's ``client_id``.
.. attribute:: name
The application's name.
.. attribute:: description
The application's description
.. attribute:: icon
The application's icon hash if it exists, ``None`` otherwise.
.. attribute:: icon_url
A property that retrieves the application's icon URL if it exists.
If it doesn't exist an empty string is returned.
.. _discord-api-enums:
Enumerations