Simplified the default endpoint
This commit is contained in:
		@@ -2,7 +2,6 @@
 | 
			
		||||
 | 
			
		||||
mod add_account;
 | 
			
		||||
mod cancel;
 | 
			
		||||
mod default;
 | 
			
		||||
mod delete;
 | 
			
		||||
mod delete_all;
 | 
			
		||||
mod export;
 | 
			
		||||
@@ -16,7 +15,6 @@ mod start;
 | 
			
		||||
 | 
			
		||||
pub use add_account::add_account;
 | 
			
		||||
pub use cancel::cancel;
 | 
			
		||||
pub use default::default;
 | 
			
		||||
pub use delete::delete;
 | 
			
		||||
pub use delete_all::delete_all;
 | 
			
		||||
pub use export::export;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
mod callbacks;
 | 
			
		||||
mod commands;
 | 
			
		||||
mod default;
 | 
			
		||||
mod markups;
 | 
			
		||||
mod master_password_check;
 | 
			
		||||
mod state;
 | 
			
		||||
@@ -32,7 +33,7 @@ pub fn get_dispatcher(
 | 
			
		||||
    token: String,
 | 
			
		||||
    db: DatabaseConnection,
 | 
			
		||||
) -> Dispatcher<Throttle<Bot>, crate::Error, teloxide::dispatching::DefaultKey> {
 | 
			
		||||
    use dptree::{case, deps, endpoint};
 | 
			
		||||
    use dptree::{case, deps};
 | 
			
		||||
 | 
			
		||||
    let bot = Bot::new(token).throttle(Limits::default());
 | 
			
		||||
 | 
			
		||||
@@ -61,7 +62,7 @@ pub fn get_dispatcher(
 | 
			
		||||
        .branch(case![State::GetPassword(next)].endpoint(state::get_password))
 | 
			
		||||
        .branch(case![State::GetDocument(next)].endpoint(state::get_document))
 | 
			
		||||
        .branch(command_handler)
 | 
			
		||||
        .branch(endpoint(commands::default));
 | 
			
		||||
        .endpoint(default::default);
 | 
			
		||||
 | 
			
		||||
    let callback_handler =
 | 
			
		||||
        Update::filter_callback_query().chain(callbacks::delete_message::get_handler());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user