-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for editing our own application information #1237
base: master
Are you sure you want to change the base?
Conversation
08019ab
to
a2bf13f
Compare
a2bf13f
to
880cfde
Compare
description: Optional[str] = MISSING, | ||
flags: ApplicationFlags = MISSING, | ||
icon: Optional[AssetBytes] = MISSING, | ||
cover_image: Optional[AssetBytes] = MISSING, | ||
custom_install_url: Optional[str] = MISSING, | ||
install_params: Optional[InstallParams] = MISSING, | ||
role_connections_verification_url: Optional[str] = MISSING, | ||
interactions_endpoint_url: Optional[str] = MISSING, | ||
tags: Optional[List[str]] = MISSING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured this is worth mentioning - most of these fields, other than icon
and cover_image
, aren't marked as nullable in the documentation.
However considering that they are optional in the application object structure itself, clearly only setting them to null
would reset the fields. So I assume this is fine?
|
||
Returns a new :class:`AppInfo` with the updated information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns a new :class:`AppInfo` with the updated information. |
description: Optional[:class:`str`] | ||
The application's description. | ||
flags: Optional[:class:`ApplicationFlags`] | ||
The application's public flags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should note that this is limited to specific flags only
icon: |resource_type| | ||
Update the application's icon asset, if any. | ||
cover_image: |resource_type| | ||
Retrieves the cover image on a store embed, if any. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this description is outdated
|
||
.. versionadded:: 2.10 | ||
|
||
Parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the docstring is missing interactions_endpoint_url
Raises | ||
------ | ||
HTTPException | ||
Editing the information failed somehow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editing the information failed somehow. | |
Editing the application information failed. |
@@ -2372,6 +2372,93 @@ async def application_info(self) -> AppInfo: | |||
data["rpc_origins"] = None | |||
return AppInfo(self._connection, data) | |||
|
|||
async def edit_application_info( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the same method on Client
seems unnecessary (also not very DRY code :<).
Summary
closes #1172
Implements PATCH
/applications/@me
https://discord.com/developers/docs/resources/application#edit-current-application
Checklist
pdm lint
pdm pyright