Bot messages work

This commit is contained in:
Benjamin Sherriff
2023-10-06 10:55:48 -04:00
parent 04b52b4e7d
commit fa7c0f8163
11 changed files with 317 additions and 183 deletions

View File

@@ -81,6 +81,12 @@ impl From<serde_json::Error> for ServiceError {
}
}
impl From<serenity::Error> for ServiceError {
fn from(error: serenity::Error) -> ServiceError {
ServiceError::new(500, format!("Unknown serenity error: {}", error))
}
}
impl ResponseError for ServiceError {
fn error_response(&self) -> HttpResponse {
let status_code = match StatusCode::from_u16(self.status) {