diff --git a/src/types/message.rs b/src/types/message.rs index 0cc01172..d4c8ecef 100644 --- a/src/types/message.rs +++ b/src/types/message.rs @@ -921,6 +921,49 @@ pub struct MediaVideo { pub media_group_id: Option, } +impl MediaVideo { + pub fn new(video: Video, caption_entities: CE) -> Self + where + CE: Into>, + { + Self { + video, + caption: None, + caption_entities: caption_entities.into(), + media_group_id: None, + } + } + + pub fn video(mut self, val: Video) -> Self { + self.video = val; + self + } + + pub fn caption(mut self, val: S) -> Self + where + S: Into, + { + self.caption = Some(val.into()); + self + } + + pub fn caption_entities(mut self, val: CE) -> Self + where + CE: Into>, + { + self.caption_entities = val.into(); + self + } + + pub fn media_group_id(mut self, val: S) -> Self + where + S: Into, + { + self.media_group_id = Some(val.into()); + self + } +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MediaVideoNote {