mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
Add setters to MediaSticker
This commit is contained in:
parent
3fc46b48df
commit
d552a221ad
1 changed files with 22 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue