简介
使用插件元数据获取插件信息,并通过插件与子插件的组织形式,来区分插件的多种功能。
树形帮助插件,最重要的功能当然是显示插件树!
发送 /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] - 默认:
[] - 说明: 需要忽略的插件名称列表
计划
- 支持输出插件版本
- 支持输出插件树
- 支持输出插件内的命令名称
Metadata
Release files for nonebot-plugin-treehelp 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_treehelp-0.5.0.tar.gz | 7.1 kB | Without provenance | Details for nonebot_plugin_treehelp-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_treehelp-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_treehelp-0.5.0-py3-none-any.whl |
Total release size: 14.5 kB
Release files / nonebot_plugin_treehelp-0.5.0.tar.gz
| Download URL | nonebot_plugin_treehelp-0.5.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc9ded8ec871e0a70664eb1c3cc6125be79fe19d124cd098f25afb3e3bc43b16
|
|
BLAKE2b-256 checksum How to use checksums |
3e777df55fc399d805f0b2fc6755a802f5266987b5689e64456ee87f8af81efb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / nonebot_plugin_treehelp-0.5.0-py3-none-any.whl
| Download URL | nonebot_plugin_treehelp-0.5.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9b594f6c7396fccb3053656d7618c40d589c3cc995628237091a543b9e552b9
|
|
BLAKE2b-256 checksum How to use checksums |
4ff452f47a979d8f1a7b49e84aaa014c67a6d02f2a9629d034a7847993cd70f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for nonebot-plugin-treehelp 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.