diff --git a/src/botscript.rs b/src/botscript.rs index 966565c..3868b91 100644 --- a/src/botscript.rs +++ b/src/botscript.rs @@ -1,7 +1,11 @@ +use std::collections::HashMap; + use quickjs_rusty::Context; use quickjs_rusty::ContextError; use quickjs_rusty::ExecutionError; use quickjs_rusty::OwnedJsValue as JsValue; +use serde::Deserialize; +use serde::Serialize; #[derive(thiserror::Error, Debug)] pub enum ScriptError { @@ -13,12 +17,39 @@ pub enum ScriptError { pub type ScriptResult = Result; +pub type BotFunction = String; // temporal workaround + // TODO: remove this function since it is suitable only for early development #[allow(clippy::print_stdout)] fn print(s: String) { println!("{s}"); } +#[derive(Serialize, Deserialize, Debug)] +pub struct BotConfig { + version: f64, +} + +#[derive(Serialize, Deserialize, Debug)] +pub struct Button { + name: String, +} + +#[derive(Serialize, Deserialize, Debug)] +pub struct BotMessage { + // buttons: Vec