add replace flag to BotMessage

This commit is contained in:
Akulij 2025-05-31 10:34:29 +05:00
parent 474795bd99
commit 3bd16a58cd

View File

@ -479,6 +479,8 @@ pub struct Button {
pub struct BotMessage { pub struct BotMessage {
// buttons: Vec<Button> // buttons: Vec<Button>
literal: Option<String>, literal: Option<String>,
#[serde(default)]
replace: bool,
buttons: Option<KeyboardDefinition>, buttons: Option<KeyboardDefinition>,
state: Option<String>, state: Option<String>,
@ -492,6 +494,10 @@ impl BotMessage {
..self.clone() ..self.clone()
} }
} }
pub fn is_replace(&self) -> bool {
self.replace
}
} }
impl BotMessage { impl BotMessage {