diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-08-05 19:00:37 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-08-05 19:00:37 +0200 |
commit | 429489349688ce452f124a691c7542d2ca2177d1 (patch) | |
tree | e2f124dc11a1bf92f13e172f267ae9ae42e07f53 /src/main.rs | |
parent | 51ea2896cdcdf7b6027f96421a0ce2b454486e03 (diff) |
feat: handle the callback of the faculty
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<dyn Error>> { .callback_queries_handler(|rx: DispatcherHandlerRx<AutoSend<Bot>, 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; } }) }) |