diff --git a/src/dispatching.rs b/src/dispatching.rs index feef5c38..e8a744bb 100644 --- a/src/dispatching.rs +++ b/src/dispatching.rs @@ -58,25 +58,29 @@ //! # async fn receive_product_selection() -> HandlerResult { Ok(()) } //! # //! fn schema() -> UpdateHandler> { -//! let command_handler = teloxide::filter_command::() +//! use teloxide::dispatching::dialogue; +//! use teloxide::filter_command; +//! use dptree::case; +//! +//! let command_handler = filter_command::() //! .branch( -//! dptree::case![State::Start] -//! .branch(dptree::case![Command::Help].endpoint(help)) -//! .branch(dptree::case![Command::Start].endpoint(start)), +//! case![State::Start] +//! .branch(case![Command::Help].endpoint(help)) +//! .branch(case![Command::Start].endpoint(start)), //! ) -//! .branch(dptree::case![Command::Cancel].endpoint(cancel)); +//! .branch(case![Command::Cancel].endpoint(cancel)); //! //! let message_handler = Update::filter_message() //! .branch(command_handler) -//! .branch(dptree::case![State::ReceiveFullName].endpoint(receive_full_name)) +//! .branch(case![State::ReceiveFullName].endpoint(receive_full_name)) //! .branch(dptree::endpoint(invalid_state)); //! //! let callback_query_handler = Update::filter_callback_query().branch( -//! dptree::case![State::ReceiveProductChoice { full_name }] +//! case![State::ReceiveProductChoice { full_name }] //! .endpoint(receive_product_selection), //! ); //! -//! teloxide::dispatching::dialogue::enter::, State, _>() +//! dialogue::enter::, State, _>() //! .branch(message_handler) //! .branch(callback_query_handler) //! }