paringboard/examples/interpreter-test.rs
2026-01-05 22:54:32 +09:00

22 lines
414 B
Rust

use std::collections::HashMap;
fn main() {
tracing_subscriber::fmt::init();
let mut map = HashMap::new();
map.insert("".into(), 2);
let result = paringboard::script::check(
r#"
if reactions["⭐"] >= 3 {
#{ channel: "YAHO", reactions: ["⭐"] }
} else {
()
}
"#,
map,
"123123123".into(),
);
dbg!(result);
}