From 927c16e1fc5e959a4496e44e3f6dcc6ca3a19531 Mon Sep 17 00:00:00 2001 From: ninemine <1371605831@qq.com> Date: Thu, 30 Oct 2025 14:27:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Esay=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/callback.py | 9 +++++++++ utils/parser.py | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/routers/callback.py b/routers/callback.py index 65e0b67..ff5454c 100644 --- a/routers/callback.py +++ b/routers/callback.py @@ -193,6 +193,15 @@ async def handle_command(game_type: str, command: str, game = GiftGame() return await game.handle(command, chat_id, user_id) + # 复述功能 + if game_type == 'say': + # 提取参数并原样返回 + _, args = CommandParser.extract_command_args(command) + args = args.strip() + if not args: + return "用法:.say 你想让我说的话\n别名:.说 / .复述" + return args + # AI对话系统 if game_type == 'ai_chat': from games.ai_chat import AIChatGame diff --git a/utils/parser.py b/utils/parser.py index 90ea8eb..15cc4b8 100644 --- a/utils/parser.py +++ b/utils/parser.py @@ -68,6 +68,11 @@ class CommandParser: '.ai': 'ai_chat', '.aiconfig': 'ai_chat', + # 复述 + '.say': 'say', + '.说': 'say', + '.复述': 'say', + # 帮助 '.help': 'help', '.帮助': 'help',