Merge branch 'dev' of github.com:async-telegram-bot/async-telegram-bot into dev

This commit is contained in:
Waffle 2019-09-03 12:04:24 +03:00
commit f304fd6a6b

View file

@ -1,4 +1,5 @@
use serde::Deserialize; use serde::Deserialize;
use crate::core::types::InputFile;
pub enum InputMedia { pub enum InputMedia {
InputMediaPhoto(InputMediaPhoto), InputMediaPhoto(InputMediaPhoto),
@ -13,7 +14,7 @@ pub enum ThumbKind {
String, String,
} }
#[derive(Debug, Serialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct InputMediaPhoto { pub struct InputMediaPhoto {
type_: String, type_: String,
media: String, media: String,
@ -21,7 +22,7 @@ pub struct InputMediaPhoto {
parse_mode: Option<String>, parse_mode: Option<String>,
} }
#[derive(Debug, Serialize)] #[derive(Debug, Serialize), Deserialize]
pub struct InputMediaVideo { pub struct InputMediaVideo {
type_: String, type_: String,
media: String, media: String,
@ -34,7 +35,7 @@ pub struct InputMediaVideo {
supports_streaming: Option<bool>, supports_streaming: Option<bool>,
} }
#[derive(Debug, Serialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct InputMediaAnimation { pub struct InputMediaAnimation {
type_: String, type_: String,
media: String, media: String,
@ -46,7 +47,7 @@ pub struct InputMediaAnimation {
duration: Option<i64>, duration: Option<i64>,
} }
#[derive(Debug, Serialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct InputMediaAudio { pub struct InputMediaAudio {
type_: String, type_: String,
media: String, media: String,
@ -58,7 +59,7 @@ pub struct InputMediaAudio {
title: Option<String> title: Option<String>
} }
#[derive(Debug, Serialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct InputMediaDocument { pub struct InputMediaDocument {
type_: String, type_: String,
media: String, media: String,