fix: Command Auto Syncing#2990
fix: Command Auto Syncing#2990Icebluewolf wants to merge 102 commits intoPycord-Development:masterfrom
Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/2990/head:pr-2990
git checkout pr-2990This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/2990/head |
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.
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.
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.
…lify owner assignment
|
That was actually an issue with sub command checking. I was returning if the first sub commands was or was not the same and never checking the other sub commands. Added tests to cover this case as well now. |
|
@Icebluewolf I think you forgot to push |
|
oh so its not me wondering where the damn commit is |
|
@Lumabots Do you think you can test this one ? |
Paillat-dev
left a comment
There was a problem hiding this comment.
lgtm; tested & works; would like someone else to test as well; thanks much nice work
…#3120) * fix: Improve docstring wording of 'for regular members' * Improve docstring wording of display methods * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/user.py Signed-off-by: Paillat <jeremiecotti@ik.me> --------- Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: Paillat <paillat@pycord.dev> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: Lala Sabathil <lala@pycord.dev> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <jeremiecotti@ik.me>
|
After thinking some more, I am moving this to 2.9.0rc1. I'd rather this be tested in better conditions before actually hitting a stable release to make sure there aren't some obscure or otherwise unintended side-effects |

Summary
This is ready but needs lots of testing.
I also need to check what the behavior is for undocumented fields in the payload from discord that may be added in the future. I believe the best option is to ignore those fields.
This gist (https://gist.github.com/Icebluewolf/1842ea5f7234ba40e5df18191bb135a0) contains 2 files. The first is where I developed the fix so that I did not have to make real API calls and is here for reference if someone wants to do the same. The second is unit tests for the new system. Both are very rough and messy sorry 🙃. This change needs to be tested extensively, so if someone sees test cases I missed or more test cases that should be added please let me know.
AI Disclosure: Single token auto complete. No LLM usage
This PR attempts to fix the long running issue with the application command auto-syncing system. Currently the system is over eager and preforms upserts on commands that do not need to be updated. The main culprit is incorrect default value checking. This PR implements a more robust and easily extendable comparison system for commands.
Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.