Error in CurrentApplicationInfo causing crash in certain case
ValgulNecron opened this issue · 0 comments
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.