mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Fixes
This commit is contained in:
@@ -25,7 +25,7 @@ use self::{
|
|||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
bots_manager::get_manager_handler, ignore_channel_messages, ignore_chat_member_update,
|
bots_manager::get_manager_handler, ignore_channel_messages, ignore_chat_member_update,
|
||||||
BotCommands, BotHandler,
|
ignore_user_edited_message, BotCommands, BotHandler,
|
||||||
};
|
};
|
||||||
|
|
||||||
async fn _update_activity(me: teloxide::types::Me, user: teloxide::types::User) -> Option<()> {
|
async fn _update_activity(me: teloxide::types::Me, user: teloxide::types::User) -> Option<()> {
|
||||||
@@ -86,6 +86,7 @@ pub fn get_approved_handler() -> (BotHandler, BotCommands) {
|
|||||||
dptree::entry()
|
dptree::entry()
|
||||||
.branch(ignore_channel_messages())
|
.branch(ignore_channel_messages())
|
||||||
.branch(ignore_chat_member_update())
|
.branch(ignore_chat_member_update())
|
||||||
|
.branch(ignore_user_edited_message())
|
||||||
.branch(update_user_activity_handler())
|
.branch(update_user_activity_handler())
|
||||||
.branch(get_help_handler())
|
.branch(get_help_handler())
|
||||||
.branch(get_settings_handler())
|
.branch(get_settings_handler())
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ where
|
|||||||
|
|
||||||
let annotation_text = annotation.get_text();
|
let annotation_text = annotation.get_text();
|
||||||
let chunked_text = split_text_to_chunks(annotation_text, 512);
|
let chunked_text = split_text_to_chunks(annotation_text, 512);
|
||||||
let current_text = chunked_text.get(0).unwrap();
|
let current_text = chunked_text.first().unwrap();
|
||||||
|
|
||||||
let callback_data = match command {
|
let callback_data = match command {
|
||||||
AnnotationCommand::Book { id } => AnnotationCallbackData::Book { id, page: 1 },
|
AnnotationCommand::Book { id } => AnnotationCallbackData::Book { id, page: 1 },
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ fn ignore_chat_member_update() -> crate::bots::BotHandler {
|
|||||||
.branch(Update::filter_my_chat_member().endpoint(|| async { Ok(()) }))
|
.branch(Update::filter_my_chat_member().endpoint(|| async { Ok(()) }))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn ignore_user_edited_message() -> crate::bots::BotHandler {
|
||||||
|
dptree::entry().branch(Update::filter_edited_message().endpoint(|| async { Ok(()) }))
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_bot_handler() -> (BotHandler, BotCommands) {
|
pub fn get_bot_handler() -> (BotHandler, BotCommands) {
|
||||||
approved_bot::get_approved_handler()
|
approved_bot::get_approved_handler()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user