Add AppInfo.owner attribute.
This commit is contained in:
		| @@ -61,7 +61,7 @@ log = logging.getLogger(__name__) | |||||||
| request_logging_format = '{method} {response.url} has returned {response.status}' | request_logging_format = '{method} {response.url} has returned {response.status}' | ||||||
| request_success_log = '{response.url} with {json} received {data}' | request_success_log = '{response.url} with {json} received {data}' | ||||||
|  |  | ||||||
| AppInfo = namedtuple('AppInfo', 'id name description icon') | AppInfo = namedtuple('AppInfo', 'id name description icon owner') | ||||||
| def app_info_icon_url(self): | def app_info_icon_url(self): | ||||||
|     """Retrieves the application's icon_url if it exists. Empty string otherwise.""" |     """Retrieves the application's icon_url if it exists. Empty string otherwise.""" | ||||||
|     if not self.icon: |     if not self.icon: | ||||||
| @@ -2688,6 +2688,7 @@ class Client: | |||||||
|         """ |         """ | ||||||
|         data = yield from self.http.application_info() |         data = yield from self.http.application_info() | ||||||
|         return AppInfo(id=data['id'], name=data['name'], |         return AppInfo(id=data['id'], name=data['name'], | ||||||
|                        description=data['description'], icon=data['icon']) |                        description=data['description'], icon=data['icon'], | ||||||
|  |                        owner=User(**data['owner'])) | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -377,6 +377,10 @@ Application Info | |||||||
|         A property that retrieves the application's icon URL if it exists. |         A property that retrieves the application's icon URL if it exists. | ||||||
|  |  | ||||||
|         If it doesn't exist an empty string is returned. |         If it doesn't exist an empty string is returned. | ||||||
|  |     .. attribute:: owner | ||||||
|  |  | ||||||
|  |         The owner of the application. This is a :class:`User` instance | ||||||
|  |         with the owner's information at the time of the call. | ||||||
|  |  | ||||||
| .. _discord-api-enums: | .. _discord-api-enums: | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user