create BotMessage.fill_literal method

This commit is contained in:
Akulij 2025-05-23 16:04:03 +05:00
parent 66180e0cfb
commit f8c63e5315

View File

@ -421,6 +421,15 @@ pub struct BotMessage {
handler: Option<BotFunction>,
}
impl BotMessage {
pub fn fill_literal(&self, l: String) -> Self {
BotMessage {
literal: self.clone().literal.or(Some(l)),
..self.clone()
}
}
}
impl Parcelable<BotFunction> for BotMessage {
fn get_field(&mut self, name: &str) -> ParcelableResult<ParcelType<BotFunction>> {
match name {