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

Error in CurrentApplicationInfo causing crash in certain case #2883

Closed
ValgulNecron opened this issue May 30, 2024 · 0 comments
Closed

Error in CurrentApplicationInfo causing crash in certain case #2883

ValgulNecron opened this issue May 30, 2024 · 0 comments
Labels
bug Something misbehaves or is not working. model Related to the `model` module.

Comments

@ValgulNecron
Copy link
Contributor

In current branch if we try to access application info with ctx.http.get_current_application_info().await.unwrap(); we get the error

thread 'tokio-runtime-worker' panicked at src\main.rs:162:65: called "Result::unwrap()" on an "Err" value: Json(Error("missing field "oauth2_install_params"", line: 1, column: 706)) stack backtrace:

this is due by the fact that bot are not required to have "installation link" (option are none, Discord provided link and custom url).
if we check the CurrentApplicationInfo there is a integration_types_config which take an InstallationContextConfig and inside it there is oauth2_install_params: InstallParams wich should be from my understanding of discord docs be an option since there is the ? next to the field name.

@GnomedDev GnomedDev added bug Something misbehaves or is not working. model Related to the `model` module. labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something misbehaves or is not working. model Related to the `model` module.
Projects
None yet
Development

No branches or pull requests

2 participants