From 62b6399e69eb8cc6aba21d759d50f85ed4974ca3 Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:04:21 -0400 Subject: [PATCH] chat.say_in_reply --- src/core/chat.rs | 22 ++++++++++++++++++++++ src/custom/experimental/experiment001.rs | 20 ++++++++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/core/chat.rs b/src/core/chat.rs index 003c617..82bc3f6 100644 --- a/src/core/chat.rs +++ b/src/core/chat.rs @@ -418,6 +418,21 @@ impl Chat { } + pub async fn say_in_reply( + &self, + destination_channel : Channel , + outmsg: String , + params : ExecBodyParams) + { + + self.send_botmsg(BotMsgType::SayInReplyTo( + destination_channel, + params.msg.message_id().to_string(), + outmsg) , params).await; + + + } + // pub async fn say_in_reply_to(&self, msg: &PrivmsgMessage, outmsg: String) { // #[async_recursion] @@ -490,6 +505,9 @@ impl Chat { } + + + // pub async fn say(&self, channel_login: String, message: String) { pub async fn say(&self, channel_login: String, message: String , params : ExecBodyParams) { // more info https://docs.rs/twitch-irc/latest/twitch_irc/client/struct.TwitchIRCClient.html#method.say @@ -497,6 +515,10 @@ impl Chat { self.send_botmsg(BotMsgType::Say(channel_login.to_lowercase(), message), params).await; } + + + + async fn _me(&self, _: String, _: String) { // more info https://docs.rs/twitch-irc/latest/twitch_irc/client/struct.TwitchIRCClient.html#method.say diff --git a/src/custom/experimental/experiment001.rs b/src/custom/experimental/experiment001.rs index e774055..cb75ad2 100644 --- a/src/custom/experimental/experiment001.rs +++ b/src/custom/experimental/experiment001.rs @@ -230,9 +230,8 @@ async fn babygirl(params : ExecBodyParams) { botlock .botmgrs .chat - .say_in_reply_to( + .say_in_reply( Channel(params.clone().msg.channel_login().to_string()), - params.clone().msg.message_id().to_string(), String::from("16:13 notohh: cafdk"), params.clone() ).await; @@ -243,9 +242,8 @@ async fn babygirl(params : ExecBodyParams) { botlock .botmgrs .chat - .say_in_reply_to( + .say_in_reply( Channel(params.clone().msg.channel_login().to_string()), - params.clone().msg.message_id().to_string(), String::from("16:13 notohh: have fun eating princess"), params.clone() ).await; @@ -253,12 +251,22 @@ async fn babygirl(params : ExecBodyParams) { sleep(Duration::from_secs_f64(2.0)).await; + // botlock + // .botmgrs + // .chat + // .say_in_reply_to( + // Channel(params.clone().msg.channel_login().to_string()), + // params.clone().msg.message_id().to_string(), + // String::from("16:13 notohh: baby girl"), + // params.clone() + // ).await; + + botlock .botmgrs .chat - .say_in_reply_to( + .say_in_reply( Channel(params.clone().msg.channel_login().to_string()), - params.clone().msg.message_id().to_string(), String::from("16:13 notohh: baby girl"), params.clone() ).await;