summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-08-05 19:00:37 +0200
committerSanto Cariotti <santo@dcariotti.me>2021-08-05 19:00:37 +0200
commit429489349688ce452f124a691c7542d2ca2177d1 (patch)
treee2f124dc11a1bf92f13e172f267ae9ae42e07f53 /src/main.rs
parent51ea2896cdcdf7b6027f96421a0ce2b454486e03 (diff)
feat: handle the callback of the faculty
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
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;
}
})
})