This commit is contained in:
ModulatingForce 2024-03-23 19:37:43 -04:00
parent 0e12cd1bff
commit 22b2ec746a
2 changed files with 49 additions and 17 deletions

View file

@ -161,6 +161,18 @@ impl BotInstance {
while let Some(message) = msglock.recv().await {
botlog::trace(
format!(
"[TRACE][ServerMessage] > {:?}",
message
)
.as_str(),
Some("BotInstance > runner()".to_string()),
None,
);
match message {
ServerMessage::Notice(msg) => {
botlog::notice(

View file

@ -157,26 +157,16 @@ async fn sayout(bot: BotAR, msg: PrivmsgMessage) {
*/
let newoutmsg = if let Some(srcmsg) = reply_parent {
if let Some(srcmsg) = reply_parent {
let newoutmsg = format!("{} from #{} Shared >> {} : {}",
msg.sender.name,msg.channel_login, reply_parent_usr.unwrap(),srcmsg);
// uses chat.say_in_reply_to() for the bot controls for messages
botlock
.botmgrs
.chat
.say(trgchnl.to_string(), newoutmsg.to_string())
.await;
}
format!("{} from #{} says {} . Replying to: {} : {}",
msg.sender.name,msg.channel_login,outmsg, reply_parent_usr.unwrap(),srcmsg)
} else {
format!("{} from #{} says : {}",
msg.sender.name,msg.channel_login, outmsg)
};
let newoutmsg = format!("{} from #{} says : {}",
msg.sender.name,msg.channel_login, outmsg);
// uses chat.say_in_reply_to() for the bot controls for messages
botlock
.botmgrs
@ -184,6 +174,36 @@ async fn sayout(bot: BotAR, msg: PrivmsgMessage) {
.say(trgchnl.to_string(), newoutmsg.to_string())
.await;
// if let Some(srcmsg) = reply_parent {
// let newoutmsg = format!("{} from #{} Shared >> {} : {}",
// msg.sender.name,msg.channel_login, reply_parent_usr.unwrap(),srcmsg);
// // uses chat.say_in_reply_to() for the bot controls for messages
// botlock
// .botmgrs
// .chat
// .say(trgchnl.to_string(), newoutmsg.to_string())
// .await;
// }
// let newoutmsg = format!("{} from #{} says : {}",
// msg.sender.name,msg.channel_login, outmsg);
// // uses chat.say_in_reply_to() for the bot controls for messages
// botlock
// .botmgrs
// .chat
// .say(trgchnl.to_string(), newoutmsg.to_string())
// .await;
// botlog::debug(
// "Sayout had issues trying to parse arguments",
// Some("experiment002 > sayout".to_string()),