Thisguy working partially
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
not fully implemented reply to the reply
This commit is contained in:
parent
72d4cf6d70
commit
d972eb7726
1 changed files with 2 additions and 36 deletions
|
@ -6,12 +6,12 @@ use rand::Rng;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::time::{sleep, Duration};
|
use tokio::time::{sleep, Duration};
|
||||||
|
|
||||||
|
|
||||||
//using the env file to get bot prefix
|
//using the env file to get bot prefix
|
||||||
use std::env;
|
use std::env;
|
||||||
use dotenv::dotenv;
|
use dotenv::dotenv;
|
||||||
|
|
||||||
//bot function
|
//bot function
|
||||||
|
|
||||||
async fn tsg(params: ExecBodyParams) {
|
async fn tsg(params: ExecBodyParams) {
|
||||||
|
|
||||||
//Defining a var prefix to the prefix on the env file
|
//Defining a var prefix to the prefix on the env file
|
||||||
|
@ -56,7 +56,7 @@ async fn tsg(params: ExecBodyParams) {
|
||||||
.await;
|
.await;
|
||||||
sleep(Duration::from_secs_f64(0.5)).await;
|
sleep(Duration::from_secs_f64(0.5)).await;
|
||||||
}else {
|
}else {
|
||||||
println!("didn't type the proper command");
|
//println!("didn't type the proper command");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,37 +91,3 @@ async fn test(params: ExecBodyParams) {
|
||||||
Some(¶ms.msg),
|
Some(¶ms.msg),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// just testing this area, not working atm
|
|
||||||
async fn replyer(params: ExecBodyParams)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
check if the command message was a reply
|
|
||||||
get reply message parent
|
|
||||||
reply to the parent
|
|
||||||
*/
|
|
||||||
|
|
||||||
//let reply_parent_message;
|
|
||||||
let reply_message: &String = ¶ms.msg.message_text;
|
|
||||||
let my_reply:String = String::from("test");
|
|
||||||
|
|
||||||
//println!("{:?}",reply_parent_message);
|
|
||||||
println!("{}",reply_message);
|
|
||||||
|
|
||||||
botlog::debug(
|
|
||||||
"Oh god I love anime Girls!!",
|
|
||||||
Some("modules > thisguy()".to_string()),
|
|
||||||
Some(¶ms.msg),
|
|
||||||
);
|
|
||||||
let bot = Arc::clone(¶ms.bot);
|
|
||||||
let botlock = bot.read().await;
|
|
||||||
|
|
||||||
// uses chat.say_in_reply_to() for the bot controls for messages
|
|
||||||
botlock
|
|
||||||
.botmgrs
|
|
||||||
.chat
|
|
||||||
.say_in_reply_to(¶ms.msg, my_reply, params.clone())
|
|
||||||
.await;
|
|
||||||
sleep(Duration::from_secs_f64(0.5)).await;
|
|
||||||
}
|
|
Loading…
Reference in a new issue