From fdf1e352a66beedefee88237dbaa3d6485bf04ba Mon Sep 17 00:00:00 2001 From: Akulij Date: Sat, 31 May 2025 10:33:26 +0500 Subject: [PATCH] add buttons field to BotDialog --- src/botscript.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/botscript.rs b/src/botscript.rs index ba6db4e..ad1364f 100644 --- a/src/botscript.rs +++ b/src/botscript.rs @@ -562,6 +562,7 @@ impl Parcelable for BotMessage { #[derive(Serialize, Deserialize, Debug, Clone)] pub struct BotDialog { pub commands: HashMap, + pub buttons: HashMap, stateful_msg_handlers: HashMap, } @@ -569,6 +570,7 @@ impl Parcelable for BotDialog { fn get_field(&mut self, name: &str) -> Result, ParcelableError> { match name { "commands" => Ok(ParcelType::Parcelable(&mut self.commands)), + "buttons" => Ok(ParcelType::Parcelable(&mut self.buttons)), "stateful_msg_handlers" => Ok(ParcelType::Parcelable(&mut self.stateful_msg_handlers)), field => Err(ParcelableError::FieldError(format!( "tried to get field {field}, but this field does not exists or private"