From 06a65423498011f9963a0bacef49dd663cd425ca Mon Sep 17 00:00:00 2001 From: Akulij Date: Fri, 6 Jun 2025 01:37:03 +0500 Subject: [PATCH] change design of variants implementation in BotConfig --- src/botscript.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/botscript.rs b/src/botscript.rs index 2fe5068..97deab2 100644 --- a/src/botscript.rs +++ b/src/botscript.rs @@ -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, - #[serde(default)] - variants: Vec, handler: Option, } @@ -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, pub buttons: HashMap, stateful_msg_handlers: HashMap, + variants: HashMap>, } impl Parcelable for BotDialog {