From a1b9371afbf1e3497d92a694634bc960f9cd4200 Mon Sep 17 00:00:00 2001 From: wood Date: Wed, 4 Sep 2024 21:39:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/guard.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/guard.py b/src/guard.py index e3fc620..d9f58c2 100644 --- a/src/guard.py +++ b/src/guard.py @@ -74,17 +74,12 @@ async def process_message(event, client): logger.info(f"New non-whitelisted links found: {new_links}") -async def command_handler(event, link_filter): - if event.is_private and event.sender_id == ADMIN_ID: - await handle_command(event, event.client) - if event.raw_text.startswith(('/add', '/delete', '/list', '/addwhite', '/delwhite', '/listwhite')): - link_filter.load_data_from_file() - async def message_handler(event, link_filter, rate_limiter): if not event.is_private or event.sender_id != ADMIN_ID: async with rate_limiter: await process_message(event, event.client) +# 处理请求 async def command_handler(event, link_filter): if event.is_private and event.sender_id == ADMIN_ID: link_filter.load_data_from_file()