diff --git a/src/types.rs b/src/types.rs index 25bc6d9..4c58a31 100644 --- a/src/types.rs +++ b/src/types.rs @@ -26,8 +26,7 @@ pub struct SenderCtx { } /// Telegram Bot API response: -/// these idiots use `{ok:true,response:...}` schema -/// for some reason +/// `{ok: true, result: (what we actually need)}` #[derive(Debug, Deserialize)] pub struct TgResponse { pub result: Vec, @@ -53,14 +52,12 @@ pub struct TgMessage { #[derive(Debug, Deserialize)] pub struct TgChat { pub id: i64, - // #[serde(default)] - // is_forum: bool, } /// XKCD API comic info schema #[derive(Debug, Deserialize)] pub struct XkcdInfo { - pub title: String, + pub title: String, // same in two APIs #[serde(alias = "image")] // xkcd.ru pub img: String, // xkcd.com #[serde(alias = "text")] // xkcd.ru