From f0dc8d9c57cc4dc5d7ab4a60acfd7b5a5547cc65 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sun, 14 May 2023 17:12:12 +0800 Subject: [PATCH] feat: info support --- helloworld.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/helloworld.py b/helloworld.py index 7a09e10..cf80700 100644 --- a/helloworld.py +++ b/helloworld.py @@ -39,6 +39,24 @@ class HelloWorldPlugin: return True, tuple([True, "Hello World!!", "helloworld"]) else: return False, None + """ + 帮助函数,当用户输入 plugin v 插件名称 时,会调用此函数,返回帮助信息 + 返回参数要求(必填):dict{ + "name": str, # 插件名称 + "desc": str, # 插件简短描述 + "help": str, # 插件帮助信息 + "version": str, # 插件版本 + "author": str, # 插件作者 + } + """ + def info(self): + return { + "name": "helloworld", + "desc": "测试插件", + "help": "测试插件, 回复helloworld即可触发", + "version": "v1.0.1 beta", + "author": "Soulter" + } # 热知识:检测消息开头指令,使用以下方法