From d428c8798da7c466c65e0bbb52d08172ebab7b4f Mon Sep 17 00:00:00 2001 From: Akulij Date: Tue, 27 May 2025 15:35:40 +0500 Subject: [PATCH] make script_handler return a public type --- src/bot_handler.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bot_handler.rs b/src/bot_handler.rs index 8a670ec..848d166 100644 --- a/src/bot_handler.rs +++ b/src/bot_handler.rs @@ -19,9 +19,10 @@ use crate::{ update_user_tg, BotResult, }; -pub fn script_handler( - rc: Arc>, -) -> Handler<'static, DependencyMap, BotResult<()>, teloxide::dispatching::DpHandlerDescription> { +pub type BotHandler = + Handler<'static, DependencyMap, BotResult<()>, teloxide::dispatching::DpHandlerDescription>; + +pub fn script_handler(rc: Arc>) -> BotHandler { dptree::entry() .inspect(|u: Update| { info!("{u:#?}"); // Print the update to the console with inspect