mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-14 05:33:44 +01:00
Add format
field to InputSticker
struct
This commit is contained in:
parent
924affbdde
commit
590d46477f
2 changed files with 8 additions and 1 deletions
crates/teloxide-core/src
|
@ -90,7 +90,7 @@ mod tests {
|
|||
types::{
|
||||
ChatId, InputFile, InputMedia, InputMediaAnimation, InputMediaAudio,
|
||||
InputMediaDocument, InputMediaPhoto, InputMediaVideo, InputSticker, MessageEntity,
|
||||
MessageEntityKind, ParseMode, UserId,
|
||||
MessageEntityKind, ParseMode, StickerFormat, UserId,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -157,6 +157,7 @@ mod tests {
|
|||
emoji_list: vec!["✈️⚙️".to_owned()],
|
||||
keywords: vec![],
|
||||
mask_position: None,
|
||||
format: StickerFormat::Static,
|
||||
},
|
||||
))
|
||||
.unwrap()
|
||||
|
|
|
@ -2,6 +2,8 @@ use serde::Serialize;
|
|||
|
||||
use crate::types::{InputFile, MaskPosition};
|
||||
|
||||
use super::StickerFormat;
|
||||
|
||||
/// This object describes a sticker to be added to a sticker set.
|
||||
#[serde_with::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
|
@ -16,6 +18,10 @@ pub struct InputSticker {
|
|||
/// More information on Sending Files <https://core.telegram.org/bots/api#sending-files>
|
||||
pub sticker: InputFile,
|
||||
|
||||
/// Format of the added sticker, must be one of "static" for a .WEBP or .PNG
|
||||
/// image, "animated" for a .TGS animation, "video" for a WEBM video
|
||||
pub format: StickerFormat,
|
||||
|
||||
/// List of 1-20 emoji associated with the sticker
|
||||
pub emoji_list: Vec<String>,
|
||||
|
||||
|
|
Loading…
Reference in a new issue