diff --git a/src/bot.rs b/src/bot.rs index bd56101..d8ebdd8 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -395,6 +395,34 @@ pub fn c_bot(c: &Context) { println!("{}", str_rep); w_cid(cid.to_string(), log_file(&"n1"), true); } + } else if com == "quiz" || com == "/quiz" { + println!("admin:{}", admin); + let output = Command::new(data_scpt(&"ai")) + .arg(&"atproto").arg(&"quiz") + .arg(&handle) + .arg(&did) + .arg(&cid) + .arg(&uri) + .arg(&cid_root) + .arg(&uri_root) + .arg(&host) + .arg(&prompt) + .arg(&prompt_sub) + .output() + .expect("zsh"); + let d = String::from_utf8_lossy(&output.stdout); + let d = d.to_string(); + let text_limit = c_char(d); + let str_rep = reply::post_request( + text_limit.to_string(), + cid.to_string(), + uri.to_string(), + cid_root.to_string(), + uri_root.to_string(), + ) + .await; + println!("{}", str_rep); + w_cid(cid.to_string(), log_file(&"n1"), true); } else if { com == "sh" || com == "/sh" } && handle == &admin { println!("admin:{}", admin); let output = Command::new(data_scpt(&"ai"))