feature: variants #22
@ -502,8 +502,6 @@ pub struct BotMessage {
|
||||
|
||||
/// flag options to command is meta, so it will be appended to user.metas in db
|
||||
meta: Option<bool>,
|
||||
#[serde(default)]
|
||||
variants: Vec<MessageVariant>,
|
||||
|
||||
handler: Option<BotFunction>,
|
||||
}
|
||||
@ -566,10 +564,6 @@ impl BotMessage {
|
||||
pub fn meta(&self) -> bool {
|
||||
self.meta.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub fn variants(&self) -> &[MessageVariant] {
|
||||
&self.variants
|
||||
}
|
||||
}
|
||||
|
||||
impl BotMessage {
|
||||
@ -642,6 +636,7 @@ pub struct BotDialog {
|
||||
pub commands: HashMap<String, BotMessage>,
|
||||
pub buttons: HashMap<String, BotMessage>,
|
||||
stateful_msg_handlers: HashMap<String, BotMessage>,
|
||||
variants: HashMap<String, HashMap<String, BotMessage>>,
|
||||
}
|
||||
|
||||
impl Parcelable<BotFunction> for BotDialog {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user