From 680593d636cd3b3d8675f5093b71858f6c15bdc8 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Tue, 6 Feb 2024 15:42:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dweb=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E5=89=8D=E7=BC=80=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/model/command/command.py b/model/command/command.py index b4fb2f387..6fcdede6f 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -95,13 +95,15 @@ class Command: return False, None def web_search(self, message): - if message == "web on": + l = message.split(' ') + if len(l) == 1: + return True, f"网页搜索功能当前状态: {self.global_object.web_search}", "web" + elif l[1] == 'on': self.global_object.web_search = True return True, "已开启网页搜索", "web" - elif message == "web off": + elif l[1] == 'off': self.global_object.web_search = False return True, "已关闭网页搜索", "web" - return True, f"网页搜索功能当前状态: {self.global_object.web_search}", "web" def get_my_id(self, message_obj, platform): user_id = "Unknown"