create BotMessage.meta flag

This commit is contained in:
Akulij 2025-06-05 22:21:14 +05:00
parent 9dfa7c52d9
commit f58f559f8d

View File

@ -499,6 +499,10 @@ pub struct BotMessage {
buttons: Option<KeyboardDefinition>, buttons: Option<KeyboardDefinition>,
state: Option<String>, state: Option<String>,
/// flag options to command is meta, so it will be appended to user.metas in db
#[serde(default)]
meta: bool,
handler: Option<BotFunction>, handler: Option<BotFunction>,
} }
@ -517,6 +521,10 @@ impl BotMessage {
pub fn get_handler(&self) -> Option<&BotFunction> { pub fn get_handler(&self) -> Option<&BotFunction> {
self.handler.as_ref() self.handler.as_ref()
} }
pub fn meta(&self) -> bool {
self.meta
}
} }
impl BotMessage { impl BotMessage {