update to teloxide 17 and add parameter to enable the manga filter

This commit is contained in:
2025-12-17 01:01:41 +00:00
parent 8ca9c85aa0
commit 9c9624b43c
12 changed files with 1373 additions and 836 deletions

View File

@@ -75,7 +75,7 @@ pub async fn run() {
)
.branch(
dptree::filter(move |msg: Message| {
is_photo(msg.clone()) && p2.compar_party(&msg.chat.id.to_string())
is_photo(msg.clone()) && p2.compar_manga_filtered(&msg.chat.id.to_string())
})
.endpoint(|msg: Message, bot: Bot| spoiler_mangas::check_image(msg, bot)),
)
@@ -154,7 +154,7 @@ fn is_photo(msg: Message) -> bool {
}
fn is_channel_user(msg: Message) -> bool {
match msg.from() {
match msg.from {
Some(u) => u.is_channel(),
None => false,
}