Plugin Manager base on import hook
Project description
Nonebot Plugin Manager
适用于 nonebot2 以及 go-cqhttp 的插件管理器
安装
- 使用nb-cli(推荐)
nb plugin install nonebot_plugin_manager
- 使用poetry
poetry add nonebot_plugin_manager
开始使用
使用前请先确保命令前缀设置为空,否则请在以下命令前加上自己的命令前缀 (默认为 /
)。
npm list
查看插件列表
npm block 插件名...
屏蔽插件
npm unblock 插件名...
启用插件
-a,--a
可选参数,全选插件
-d,--d
可选参数,全局管理
TO DO
- 分群插件管理
- 调用 nb-cli 安装卸载插件
展开更多
原理
使用 run_preprocessor
装饰器,在 Matcher 运行之前检测其所属的 Plugin 判断是否打断。
事实上 Nonebot 还是加载了插件,所以只能算是屏蔽而非卸载。
Bug
- 无法停用 Matcher 以外的功能(也就是说无法屏蔽主动发消息的插件,例如 Harukabot )。
- 目前任何人都可以管理插件
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
Close
Hashes for nonebot_plugin_manager-0.2.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f36dee82d74ded9676177a0ac379db0cf8cb91a4678ace6eab9ed2b816352a01 |
|
MD5 | fa0259583d573c5950652e5c6b066cca |
|
BLAKE2b-256 | 3ae25a93d49bc63da5ae853e7fea33f797abb1223fc36f20e6e95ab8af69dd65 |
Close
Hashes for nonebot_plugin_manager-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09b01c5caa87c33e0531e69fd0e66e8a10ca287a4f0f7e5f998ea98f0af877a9 |
|
MD5 | 08b4041e261e6ae374e4207610dcfda4 |
|
BLAKE2b-256 | a20508ba9870e70844b3a661a01ea586eb96409c1926a0185032c7a847fb440c |