update dependencies and add rewrite urls

This commit is contained in:
2024-09-24 21:09:06 +02:00
parent c94df04eed
commit deec5840fc
8 changed files with 1468 additions and 540 deletions

View File

@@ -6,6 +6,7 @@ mod ban_stiker;
mod database;
mod spoiler_mangas;
mod telegram_utils;
mod rewrite_links;
#[derive(BotCommands, Clone)]
#[command(rename_rule = "lowercase", description = "These commands are supported:")]
@@ -70,6 +71,10 @@ async fn run(){
dptree::filter(move |msg: Message| (is_photo(msg.clone()) && p2.compar_party(&msg.chat.id.to_string())))
.endpoint(|msg: Message, bot: Bot| spoiler_mangas::check_image(msg, bot)),
)
.branch(
dptree::filter(move |msg: Message| rewrite_links::check_contain_links::contain_links(msg.clone()))
.endpoint(|msg: Message, bot: Bot| rewrite_links::check_contain_links::fix_links(msg, bot)),
)
.branch(
dptree::filter(move |msg: Message| permissions.compar_party(&msg.chat.id.to_string()))
.endpoint(|msg: Message, bot: Bot| pole_dialogue::exe_pole(msg, bot)),