Skip to content
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

API v9 and backwards compatibility #168

Open
biqqles opened this issue Jul 6, 2022 · 0 comments · May be fixed by #169
Open

API v9 and backwards compatibility #168

biqqles opened this issue Jul 6, 2022 · 0 comments · May be fixed by #169

Comments

@biqqles
Copy link
Contributor

biqqles commented Jul 6, 2022

As it stands, the 'upgrade' to API v9 scheduled for release 3.5.0 will break backwards compatibility, because intents are now enforced. This means that attempting to initialise a bot with default Developer Portal settings will now cause:

[ERROR : websocket @ 2022-07-06 11:55:23.781] The websocket connection has closed: (no information)
[ERROR : websocket @ 2022-07-06 11:55:23.782] Websocket close frame received!
[ERROR : websocket @ 2022-07-06 11:55:23.782] Code: 4014
[ERROR : websocket @ 2022-07-06 11:55:23.782] Message: Disallowed intent(s).
[ERROR : websocket @ 2022-07-06 11:55:23.782] You attempted to identify with privileged intents that your bot is not authorized to use
Please enable the privileged intents on the bot page of your application on the discord developer page.

This is not a terrible experience by any means, since it hints at how to fix the problem, but incompatibility like this is still not ideal for a point release. I wonder if we can improve this experience before releasing.

I have some possible solutions (I'm sure there are more, and likely better ones):

  1. Change the default value of intents to the new :unprivileged value I added in Allow Bot#initialize to request only unprivileged intents #55. This is a poor option because while apps wouldn't crash upon upgrading, they would silently break instead.
  2. Try the old default value :all, but fall back to :unprivileged if this is denied, and warn.
  3. Accept that we need to crash, but improve the traceback by informing the user about the intents argument and their choices.
@biqqles biqqles linked a pull request Jul 20, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant