适用于 Nonebot2 的树形帮助插件
Project description
NoneBot Plugin TreeHelp
✨ NoneBot 树形帮助插件 ✨
简介
使用插件元数据获取插件信息,并通过插件与子插件的组织形式,来区分插件的多种功能。
树形帮助插件,最重要的功能当然是显示插件树!
发送 /help --tree
,你将获得如下帮助:
插件:
帮助 # 获取插件帮助信息
测试 # 一个测试插件
├── 复杂功能 # 测试插件复杂子插件
│ └── 二级功能 # 测试插件二级插件
└── 简单功能 # 测试插件简单子插件
使用方式
加载插件后发送 /help help
或 /help --help
获取具体用法。
插件适配
插件与子插件写法可参考 示例插件。
声明适配器
通过设置 adapters 属性来指定支持的适配器。如果不设置或留空则默认支持全部适配器。如果插件不支持该适配器,则不会在帮助列表上显示。
__plugin_meta__ = PluginMetadata(
name="OneBot",
description="测试 OneBot 适配器",
usage="/onebot",
type="application",
supported_adapters={"~onebot.v11", "~onebot.v12"},
)
配置项
配置方式:直接在 NoneBot
全局配置文件中添加以下配置项即可。
treehelp_ignored_plugins
- 类型:
list[str]
- 默认:
[]
- 说明: 需要忽略的插件名称列表
计划
- 支持输出插件版本
- 支持输出插件树
- 支持输出插件内的命令名称
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nonebot_plugin_treehelp-0.5.0.tar.gz
.
File metadata
- Download URL: nonebot_plugin_treehelp-0.5.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc9ded8ec871e0a70664eb1c3cc6125be79fe19d124cd098f25afb3e3bc43b16 |
|
MD5 | 9c343423c39dcae99af5eceb8ffa5268 |
|
BLAKE2b-256 | 3e777df55fc399d805f0b2fc6755a802f5266987b5689e64456ee87f8af81efb |
File details
Details for the file nonebot_plugin_treehelp-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: nonebot_plugin_treehelp-0.5.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9b594f6c7396fccb3053656d7618c40d589c3cc995628237091a543b9e552b9 |
|
MD5 | 341b543a67a8cbedaa84be7f7fb9266c |
|
BLAKE2b-256 | 4ff452f47a979d8f1a7b49e84aaa014c67a6d02f2a9629d034a7847993cd70f5 |