update to teloxide 17 and add parameter to enable the manga filter
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user