feat: Add support for editing application info and new fields#2994
feat: Add support for editing application info and new fields#2994Lumabots wants to merge 57 commits intoPycord-Development:masterfrom
Conversation
Introduces the AppInfo.edit coroutine to allow editing application settings. Updates AppInfo and related types to support new fields such as bot, flags, event webhooks, integration_types_config, and approximate_user_authorization_count. Also refactors type hints and improves handling of optional fields for better API compatibility.
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/2994/head:pr-2994
git checkout pr-2994This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/2994/head |
Soheab
left a comment
There was a problem hiding this comment.
Also missing docs for the new attributes.
Introduces the AppInfo.edit() method to allow editing application settings, including new and previously missing fields such as icon, cover_image, tags, install_params, integration_types_config, flags, event_webhooks_url, event_webhooks_status, and event_webhooks_types. Also adds related helper classes and properties for handling these fields and updates the CHANGELOG accordingly.
There was a problem hiding this comment.
Pull Request Overview
This pull request adds an AppInfo.edit() method for editing application settings and includes missing fields from the Discord API to the AppInfo class.
Key Changes:
- Added
AppInfo.edit()method to modify application settings via the Discord API - Added new fields to
AppInfoincludingbot,event_webhooks_*,integration_types_config, andapproximate_user_authorization_count - Restructured TypedDict definitions in
discord/types/appinfo.pyto better reflect the Discord API structure - Added
IntegrationTypesConfighelper class for per-installation context configuration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| discord/types/appinfo.py | Restructured TypedDict definitions, changed from User to PartialUser, moved many fields to NotRequired, and added new type aliases for application integration types |
| discord/http.py | Added edit_current_application() HTTP method to support the new edit functionality |
| discord/client.py | Removed workaround for missing rpc_origins field and cleaned up unused imports |
| discord/appinfo.py | Added new edit() method, new fields and properties, IntegrationTypesConfig class, and to_payload() method for AppInstallParams |
| CHANGELOG.md | Documented the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Updated the AppInfo class to only accept bytes or None for the icon and cover_image parameters, removing support for str. This change clarifies the expected types and may prevent type-related errors.
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: Paillat <jeremiecotti@ik.me> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: Paillat <jeremiecotti@ik.me> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
|
Moving this to 2.8 because it is clearly a feat if we follow semver so technically shouldn't be in 2.7.1 |
Introduces the AppInfo.edit coroutine to allow editing application settings. Updates AppInfo and related types to support new fields such as bot, flags, event webhooks, integration_types_config, and approximate_user_authorization_count. Also refactors type hints and improves handling of optional fields for better API compatibility.
Summary
Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.