1
0

fix fortune
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
syui 2024-03-29 16:34:55 +09:00
parent d6777a0c6a
commit 7bbc3370d7
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
2 changed files with 3 additions and 9 deletions

@ -1 +1 @@
Subproject commit 6408d69188d2db30ed0f5560118c86b8342fc3cd Subproject commit ebcee0f982abcd11155bcab70929c9e341c4e60f

View File

@ -154,7 +154,7 @@ pub fn c_bot(c: &Context) {
|| com.contains("うらない") == true || com.contains("うらない") == true
|| com.contains("うらなって") == true || com.contains("うらなって") == true
{ {
let output = Command::new(data_scpt(&"ai")) let _output = Command::new(data_scpt(&"ai"))
.arg(&"atproto").arg(&"fortune") .arg(&"atproto").arg(&"fortune")
.arg(&handle) .arg(&handle)
.arg(&did) .arg(&did)
@ -167,13 +167,7 @@ pub fn c_bot(c: &Context) {
.arg(&prompt_sub) .arg(&prompt_sub)
.output() .output()
.expect("zsh"); .expect("zsh");
let d = String::from_utf8_lossy(&output.stdout);
let d = d.to_string();
let text_limit = c_char(d);
if text_limit.len() > 3 {
println!("{}", text_limit);
w_cid(cid.to_string(), log_file(&"n1"), true); w_cid(cid.to_string(), log_file(&"n1"), true);
}
} else if com == "card" || com == "/card" { } else if com == "card" || com == "/card" {
let output = Command::new(data_scpt(&"ai")) let output = Command::new(data_scpt(&"ai"))
.arg(&"atproto").arg(&"card") .arg(&"atproto").arg(&"card")