migration to JS engine #1
@ -62,16 +62,22 @@ pub struct Button {
|
|||||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||||
pub struct BotMessage {
|
pub struct BotMessage {
|
||||||
// buttons: Vec<Button>
|
// buttons: Vec<Button>
|
||||||
buttons: BotFunction,
|
buttons: Option<BotFunction>,
|
||||||
|
state: Option<String>,
|
||||||
|
|
||||||
|
handler: Option<BotFunction>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct BotDialog(HashMap<String, BotMessage>);
|
pub struct BotDialog {
|
||||||
|
pub commands: HashMap<String, BotMessage>,
|
||||||
|
stateful_msg_handlers: HashMap<String, BotMessage>,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct RunnerConfig {
|
pub struct RunnerConfig {
|
||||||
config: BotConfig,
|
config: BotConfig,
|
||||||
dialog: BotDialog,
|
pub dialog: BotDialog,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Runner {
|
pub struct Runner {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user