enh pyramid + chat module
This commit is contained in:
parent
5faf982485
commit
8eaa56dd0c
19 changed files with 455 additions and 176 deletions
simple_command_bot/src
|
|
@ -34,7 +34,7 @@ pub async fn main() {
|
|||
/* 2. Define an async fn callback execution */
|
||||
async fn execbody(bot:Arc<Bot>,message:ServerMessage) -> Result<String,String> {
|
||||
if let ServerMessage::Privmsg(msg) = message {
|
||||
let _ = bot.client.say_in_reply_to(&msg, String::from("test success")).await;
|
||||
let _ = bot.chat.lock().await.say_in_reply_to(&msg, String::from("test success")).await;
|
||||
return Result::Ok("Success".to_string()) ;
|
||||
}
|
||||
Result::Err("Not Valid message type".to_string())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue