style: cleanup types.rs
This commit is contained in:
parent
515ea87156
commit
f4c3a6a569
1 changed files with 2 additions and 5 deletions
|
@ -26,8 +26,7 @@ pub struct SenderCtx {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Telegram Bot API response:
|
/// Telegram Bot API response:
|
||||||
/// these idiots use `{ok:true,response:...}` schema
|
/// `{ok: true, result: (what we actually need)}`
|
||||||
/// for some reason
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct TgResponse {
|
pub struct TgResponse {
|
||||||
pub result: Vec<TgUpdate>,
|
pub result: Vec<TgUpdate>,
|
||||||
|
@ -53,14 +52,12 @@ pub struct TgMessage {
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct TgChat {
|
pub struct TgChat {
|
||||||
pub id: i64,
|
pub id: i64,
|
||||||
// #[serde(default)]
|
|
||||||
// is_forum: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// XKCD API comic info schema
|
/// XKCD API comic info schema
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct XkcdInfo {
|
pub struct XkcdInfo {
|
||||||
pub title: String,
|
pub title: String, // same in two APIs
|
||||||
#[serde(alias = "image")] // xkcd.ru
|
#[serde(alias = "image")] // xkcd.ru
|
||||||
pub img: String, // xkcd.com
|
pub img: String, // xkcd.com
|
||||||
#[serde(alias = "text")] // xkcd.ru
|
#[serde(alias = "text")] // xkcd.ru
|
||||||
|
|
Loading…
Add table
Reference in a new issue