Closed pictca closed 4 years ago
I find it! use tokio
thread::spawn(move || {
... // logic stuff
tokio::run(api_.execute(SendMessage::new(chat_id, "OK")).then(|r| {
if let Err(e) = r {
error!("An error as occured: {:?}", e);
}
//Ok(HandlerResult::Continue)
Ok::<(), ()>(())
}));
... // logic stuff
});
I tried to send message in main local thread not in handler function but it's occurred error panic.
it's not even go show some error in closure function. How i will solve this? :neutral_face: