Exec Body Fn should be passed Parent BotAction
#43
3 changed files with 127 additions and 61 deletions
|
@ -653,16 +653,22 @@ pub async fn init(mgr: Arc<ModulesManager>) {
|
|||
Some(¶ms.msg),
|
||||
);
|
||||
|
||||
if parent_module.is_some() {
|
||||
botlock.botmgrs.chat.send_botmsg(super::chat::BotMsgType::Notif(
|
||||
outmsg.to_string()
|
||||
),
|
||||
params.clone(),
|
||||
).await;
|
||||
|
||||
botlock.botmgrs.chat.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
outmsg,
|
||||
// parent_module.unwrap().clone()
|
||||
params.clone()
|
||||
).await;
|
||||
// if parent_module.is_some() {
|
||||
|
||||
}
|
||||
// botlock.botmgrs.chat.say_in_reply_to(
|
||||
// ¶ms.msg,
|
||||
// outmsg,
|
||||
// // parent_module.unwrap().clone()
|
||||
// params.clone()
|
||||
// ).await;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// [ ] NOTE : After the above, I should receive only the roles in the context of the current channel I received this ideally and maybe BotAdmin ; not outside
|
||||
|
|
|
@ -126,7 +126,7 @@ pub async fn init(mgr: Arc<ModulesManager>) {
|
|||
// };
|
||||
|
||||
|
||||
let parent_module = params.get_parent_module().await;
|
||||
// let parent_module = params.get_parent_module().await;
|
||||
|
||||
// [ ] Uses gen_ratio() to output bool based on a ratio probability .
|
||||
// - For example gen_ratio(2,3) is 2 out of 3 or 0.67% (numerator,denomitator)
|
||||
|
@ -153,23 +153,34 @@ pub async fn init(mgr: Arc<ModulesManager>) {
|
|||
|
||||
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,
|
||||
String::from("GoodGirl xdd "),
|
||||
// parent_module.unwrap().clone()
|
||||
params.clone()
|
||||
).await;
|
||||
|
||||
if parent_module.is_some() {
|
||||
// if parent_module.is_some() {
|
||||
|
||||
// uses chat.say_in_reply_to() for the bot controls for messages
|
||||
botlock
|
||||
.botmgrs
|
||||
.chat
|
||||
.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
String::from("GoodGirl xdd "),
|
||||
// parent_module.unwrap().clone()
|
||||
params.clone()
|
||||
).await;
|
||||
// // uses chat.say_in_reply_to() for the bot controls for messages
|
||||
// botlock
|
||||
// .botmgrs
|
||||
// .chat
|
||||
// .say_in_reply_to(
|
||||
// ¶ms.msg,
|
||||
// String::from("GoodGirl xdd "),
|
||||
// // parent_module.unwrap().clone()
|
||||
// params.clone()
|
||||
// ).await;
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -219,46 +230,84 @@ async fn babygirl(params : ExecBodyParams) {
|
|||
|
||||
let botlock = bot.read().await;
|
||||
|
||||
if parent_module.is_some() {
|
||||
|
||||
// uses chat.say_in_reply_to() for the bot controls for messages
|
||||
botlock
|
||||
.botmgrs
|
||||
.chat
|
||||
.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
String::from("16:13 notohh: cafdk"),
|
||||
// parent_module.clone().unwrap().clone()
|
||||
params.clone()
|
||||
).await;
|
||||
|
||||
|
||||
sleep(Duration::from_secs_f64(0.5)).await;
|
||||
|
||||
botlock
|
||||
// uses chat.say_in_reply_to() for the bot controls for messages
|
||||
botlock
|
||||
.botmgrs
|
||||
.chat
|
||||
.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
String::from("16:13 notohh: have fun eating princess"),
|
||||
// parent_module.clone().unwrap().clone()
|
||||
String::from("16:13 notohh: cafdk"),
|
||||
params.clone()
|
||||
).await;
|
||||
|
||||
|
||||
sleep(Duration::from_secs_f64(2.0)).await;
|
||||
sleep(Duration::from_secs_f64(0.5)).await;
|
||||
|
||||
botlock
|
||||
.botmgrs
|
||||
.chat
|
||||
.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
String::from("16:13 notohh: baby girl"),
|
||||
// parent_module.unwrap().clone()
|
||||
params.clone()
|
||||
).await;
|
||||
botlock
|
||||
.botmgrs
|
||||
.chat
|
||||
.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
String::from("16:13 notohh: have fun eating princess"),
|
||||
params.clone()
|
||||
).await;
|
||||
|
||||
}
|
||||
|
||||
sleep(Duration::from_secs_f64(2.0)).await;
|
||||
|
||||
botlock
|
||||
.botmgrs
|
||||
.chat
|
||||
.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
String::from("16:13 notohh: baby girl"),
|
||||
params.clone()
|
||||
).await;
|
||||
|
||||
|
||||
|
||||
// if parent_module.is_some() {
|
||||
|
||||
// // uses chat.say_in_reply_to() for the bot controls for messages
|
||||
// botlock
|
||||
// .botmgrs
|
||||
// .chat
|
||||
// .say_in_reply_to(
|
||||
// ¶ms.msg,
|
||||
// String::from("16:13 notohh: cafdk"),
|
||||
// // parent_module.clone().unwrap().clone()
|
||||
// params.clone()
|
||||
// ).await;
|
||||
|
||||
|
||||
// sleep(Duration::from_secs_f64(0.5)).await;
|
||||
|
||||
// botlock
|
||||
// .botmgrs
|
||||
// .chat
|
||||
// .say_in_reply_to(
|
||||
// ¶ms.msg,
|
||||
// String::from("16:13 notohh: have fun eating princess"),
|
||||
// // parent_module.clone().unwrap().clone()
|
||||
// params.clone()
|
||||
// ).await;
|
||||
|
||||
|
||||
// sleep(Duration::from_secs_f64(2.0)).await;
|
||||
|
||||
// botlock
|
||||
// .botmgrs
|
||||
// .chat
|
||||
// .say_in_reply_to(
|
||||
// ¶ms.msg,
|
||||
// String::from("16:13 notohh: baby girl"),
|
||||
// // parent_module.unwrap().clone()
|
||||
// params.clone()
|
||||
// ).await;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -250,21 +250,32 @@ async fn sayout(params : ExecBodyParams) {
|
|||
|
||||
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,
|
||||
String::from("Invalid arguments"),
|
||||
// parent_module.unwrap().clone()
|
||||
params.clone()
|
||||
).await;
|
||||
|
||||
if parent_module.is_some() {
|
||||
|
||||
// if parent_module.is_some() {
|
||||
|
||||
// uses chat.say_in_reply_to() for the bot controls for messages
|
||||
botlock
|
||||
.botmgrs
|
||||
.chat
|
||||
.say_in_reply_to(
|
||||
¶ms.msg,
|
||||
String::from("Invalid arguments"),
|
||||
// parent_module.unwrap().clone()
|
||||
params.clone()
|
||||
).await;
|
||||
// // uses chat.say_in_reply_to() for the bot controls for messages
|
||||
// botlock
|
||||
// .botmgrs
|
||||
// .chat
|
||||
// .say_in_reply_to(
|
||||
// ¶ms.msg,
|
||||
// String::from("Invalid arguments"),
|
||||
// // parent_module.unwrap().clone()
|
||||
// params.clone()
|
||||
// ).await;
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue