diff --git a/src/botscript.rs b/src/botscript.rs index 63231f6..ce890af 100644 --- a/src/botscript.rs +++ b/src/botscript.rs @@ -499,6 +499,10 @@ pub struct BotMessage { buttons: Option, state: Option, + /// flag options to command is meta, so it will be appended to user.metas in db + #[serde(default)] + meta: bool, + handler: Option, } @@ -517,6 +521,10 @@ impl BotMessage { pub fn get_handler(&self) -> Option<&BotFunction> { self.handler.as_ref() } + + pub fn meta(&self) -> bool { + self.meta + } } impl BotMessage {