make script_handler return a public type
This commit is contained in:
parent
6eb6f2f454
commit
d428c8798d
@ -19,9 +19,10 @@ use crate::{
|
|||||||
update_user_tg, BotResult,
|
update_user_tg, BotResult,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn script_handler(
|
pub type BotHandler =
|
||||||
rc: Arc<RwLock<RunnerConfig>>,
|
Handler<'static, DependencyMap, BotResult<()>, teloxide::dispatching::DpHandlerDescription>;
|
||||||
) -> Handler<'static, DependencyMap, BotResult<()>, teloxide::dispatching::DpHandlerDescription> {
|
|
||||||
|
pub fn script_handler(rc: Arc<RwLock<RunnerConfig>>) -> BotHandler {
|
||||||
dptree::entry()
|
dptree::entry()
|
||||||
.inspect(|u: Update| {
|
.inspect(|u: Update| {
|
||||||
info!("{u:#?}"); // Print the update to the console with inspect
|
info!("{u:#?}"); // Print the update to the console with inspect
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user