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',