Initial commit
This commit is contained in:
commit
8c6f7d4379
21 changed files with 4184 additions and 0 deletions
22
examples/interpreter-test.rs
Normal file
22
examples/interpreter-test.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue