mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-20 13:59:00 +01:00
Add setters to MessageMigrate
This commit is contained in:
parent
9ec475a69c
commit
f5b81e87b4
1 changed files with 16 additions and 0 deletions
|
@ -307,6 +307,22 @@ pub struct MessageMigrate {
|
|||
pub migrate_from_chat_id: i64,
|
||||
}
|
||||
|
||||
impl MessageMigrate {
|
||||
pub fn new(migrate_to_chat_id: i64, migrate_from_chat_id: i64) -> Self {
|
||||
Self { migrate_to_chat_id, migrate_from_chat_id }
|
||||
}
|
||||
|
||||
pub fn migrate_to_chat_id(mut self, val: i64) -> Self {
|
||||
self.migrate_to_chat_id = val;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn migrate_from_chat_id(mut self, val: i64) -> Self {
|
||||
self.migrate_from_chat_id = val;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessagePinned {
|
||||
|
|
Loading…
Add table
Reference in a new issue