Moved command handlers below state handlers

This commit is contained in:
StNicolay 2023-05-04 21:01:00 +03:00
parent 89d3ea1bf7
commit 925df8a5e5
Signed by: StNicolay
GPG Key ID: 9693D04DCD962B0D

View File

@ -74,11 +74,11 @@ pub fn get_dispatcher(
let message_handler = Update::filter_message()
.map_async(utils::delete_message)
.enter_dialogue::<Update, InMemStorage<State>, State>()
.branch(command_handler)
.branch(case![State::GetAccountName(next)].endpoint(state::get_account_name))
.branch(case![State::GetMasterPass(next)].endpoint(state::get_master_pass))
.branch(case![State::GetLogin(next)].endpoint(state::get_login))
.branch(case![State::GetPassword(next)].endpoint(state::get_password))
.branch(command_handler)
.branch(endpoint(commands::default));
Dispatcher::builder(bot, message_handler)