mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Implement editing application info
This commit is contained in:
@ -2456,6 +2456,22 @@ class HTTPClient:
|
||||
def application_info(self) -> Response[appinfo.AppInfo]:
|
||||
return self.request(Route('GET', '/oauth2/applications/@me'))
|
||||
|
||||
def edit_application_info(self, *, reason: Optional[str], payload: Any) -> Response[appinfo.AppInfo]:
|
||||
valid_keys = (
|
||||
'custom_install_url',
|
||||
'description',
|
||||
'role_connections_verification_url',
|
||||
'install_params',
|
||||
'flags',
|
||||
'icon',
|
||||
'cover_image',
|
||||
'interactions_endpoint_url ',
|
||||
'tags',
|
||||
)
|
||||
|
||||
payload = {k: v for k, v in payload.items() if k in valid_keys}
|
||||
return self.request(Route('PATCH', '/applications/@me'), json=payload, reason=reason)
|
||||
|
||||
async def get_gateway(self, *, encoding: str = 'json', zlib: bool = True) -> str:
|
||||
try:
|
||||
data = await self.request(Route('GET', '/gateway'))
|
||||
|
Reference in New Issue
Block a user