mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 07:25:36 +01:00
Refactor support handler to remove unnecessary dptree entry
This commit is contained in:
@@ -2,6 +2,7 @@ use crate::bots::BotHandlerInternal;
|
|||||||
|
|
||||||
use teloxide::{
|
use teloxide::{
|
||||||
adaptors::{CacheMe, Throttle},
|
adaptors::{CacheMe, Throttle},
|
||||||
|
dispatching::UpdateFilterExt,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
utils::command::BotCommands,
|
utils::command::BotCommands,
|
||||||
};
|
};
|
||||||
@@ -57,9 +58,7 @@ pub async fn support_command_handler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_support_handler() -> crate::bots::BotHandler {
|
pub fn get_support_handler() -> crate::bots::BotHandler {
|
||||||
dptree::entry().branch(
|
|
||||||
Update::filter_message()
|
Update::filter_message()
|
||||||
.filter_command::<SupportCommand>()
|
.filter_command::<SupportCommand>()
|
||||||
.endpoint(support_command_handler),
|
.endpoint(support_command_handler)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user