Ignore chat join request

This commit is contained in:
2024-02-25 18:15:02 +01:00
parent 9987337c7f
commit 8e45b0379e
2 changed files with 6 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ use self::{
use super::{
bots_manager::get_manager_handler, ignore_channel_messages, ignore_chat_member_update,
ignore_user_edited_message, BotCommands, BotHandler,
ignore_user_edited_message, ingore_chat_join_request, BotCommands, BotHandler,
};
async fn _update_activity(me: teloxide::types::Me, user: teloxide::types::User) -> Option<()> {
@@ -87,6 +87,7 @@ pub fn get_approved_handler() -> (BotHandler, BotCommands) {
.branch(ignore_channel_messages())
.branch(ignore_chat_member_update())
.branch(ignore_user_edited_message())
.branch(ingore_chat_join_request())
.branch(update_user_activity_handler())
.branch(get_help_handler())
.branch(get_settings_handler())

View File

@@ -32,6 +32,10 @@ fn ignore_user_edited_message() -> crate::bots::BotHandler {
dptree::entry().branch(Update::filter_edited_message().endpoint(|| async { Ok(()) }))
}
fn ingore_chat_join_request() -> crate::bots::BotHandler {
dptree::entry().branch(Update::filter_chat_join_request().endpoint(|| async { Ok(()) }))
}
pub fn get_bot_handler() -> (BotHandler, BotCommands) {
approved_bot::get_approved_handler()
}