From 429489349688ce452f124a691c7542d2ca2177d1 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 5 Aug 2021 19:00:37 +0200 Subject: feat: handle the callback of the faculty --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index c038a9b..79b6e6e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ use std::error::Error; use teloxide::prelude::*; mod browser; +mod callbacks; mod commands; mod config; @@ -41,8 +42,8 @@ async fn main() -> Result<(), Box> { .callback_queries_handler(|rx: DispatcherHandlerRx, CallbackQuery>| { UnboundedReceiverStream::new(rx).for_each_concurrent(None, |cx| async move { let data = &cx.update.data; - if let Some(d) = data { - println!("{}", d); + if let Some(text) = data { + callbacks::handler(text).await; } }) }) -- cgit v1.2.3-18-g5258