Add setters to MediaSticker

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 14:38:53 +06:00
parent 3fc46b48df
commit d552a221ad

View file

@ -833,6 +833,17 @@ pub struct MediaPoll {
pub poll: Poll,
}
impl MediaPoll {
pub fn new(poll: Poll) -> Self {
Self { poll }
}
pub fn poll(mut self, val: Poll) -> Self {
self.poll = val;
self
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MediaSticker {
@ -840,6 +851,17 @@ pub struct MediaSticker {
pub sticker: Sticker,
}
impl MediaSticker {
pub fn new(sticker: Sticker) -> Self {
Self { sticker }
}
pub fn poll(mut self, val: Sticker) -> Self {
self.sticker = val;
self
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MediaText {