Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit 7b6e779

Browse files
committed
Discord can you stop shitting yourself all the time
1 parent 1255044 commit 7b6e779

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

scripty_bot_utils/src/error/handler.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ async fn _on_error(error: FrameworkError<'_, Data, Error>) {
5757
)
5858
.await;
5959
}
60+
ErrorEnum::Serenity(serenity::Error::Http(
61+
http::HttpError::UnsuccessfulRequest(http::ErrorResponse {
62+
status_code,
63+
error: DiscordJsonError { code, message, .. },
64+
..
65+
}),
66+
)) if status_code == http::StatusCode::BAD_GATEWAY => {
67+
send_err_msg(
68+
ctx,
69+
"Discord broke!",
70+
"There's nothing we can do about this. Try again in a few minutes. (502 \
71+
Bad Gateway)",
72+
)
73+
.await
74+
}
6075

6176
_ if error.is_user_error() => {
6277
send_err_msg(

0 commit comments

Comments
 (0)