feature: variants #22
@ -499,6 +499,10 @@ pub struct BotMessage {
|
||||
buttons: Option<KeyboardDefinition>,
|
||||
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>,
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user