make script_handler return a public type

This commit is contained in:
Akulij 2025-05-27 15:35:40 +05:00
parent 6eb6f2f454
commit d428c8798d

View File

@ -19,9 +19,10 @@ use crate::{
update_user_tg, BotResult,
};
pub fn script_handler(
rc: Arc<RwLock<RunnerConfig>>,
) -> Handler<'static, DependencyMap, BotResult<()>, teloxide::dispatching::DpHandlerDescription> {
pub type BotHandler =
Handler<'static, DependencyMap, BotResult<()>, teloxide::dispatching::DpHandlerDescription>;
pub fn script_handler(rc: Arc<RwLock<RunnerConfig>>) -> BotHandler {
dptree::entry()
.inspect(|u: Update| {
info!("{u:#?}"); // Print the update to the console with inspect