From 339ea5f12ae6378611024534db2275d21327f4db Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Tue, 23 May 2023 11:01:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E9=A2=84=E8=AE=BE=E6=8C=87=E4=BB=A4=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/model/command/command.py b/model/command/command.py index 96fdf97fe..575b7be9e 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -183,6 +183,9 @@ class Command: elif l[1] == "l": try: plugin_list_info = "\n".join([f"{k}: \n名称: {v['info']['name']}\n简介: {v['info']['desc']}\n版本: {v['info']['version']}\n作者: {v['info']['author']}\n" for k, v in cached_plugins.items()]) + if platform == gu.PLATFORM_GOCQ: + p = gu.create_text_image("【已激活插件列表】", plugin_list_info + "\n使用plugin v 插件名 查看插件帮助\n") + return True, [Image.fromFileSystem(p)], "plugin" return True, "\n=====已激活插件列表=====\n" + plugin_list_info + "\n使用plugin v 插件名 查看插件帮助\n=================", "plugin" except BaseException as e: return False, f"获取插件列表失败,原因: {str(e)}", "plugin" @@ -190,6 +193,9 @@ class Command: try: if l[2] in cached_plugins: info = cached_plugins[l[2]]["info"] + if platform == gu.PLATFORM_GOCQ: + p = gu.create_text_image(f"【插件信息】", f"名称: {info['name']}\n{info['desc']}\n版本: {info['version']}\n作者: {info['author']}\n\n帮助:\n{info['help']}") + return True, [Image.fromFileSystem(p)], "plugin" res = f"\n=====插件信息=====\n名称: {info['name']}\n{info['desc']}\n版本: {info['version']}作者: {info['author']}\n\n帮助:\n{info['help']}" return True, res, "plugin" else: