Nonebot 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, --all
可选参数,全选插件 (仅群管及超级用户可用)
-d, --default
可选参数,管理默认设置 (仅超级用户可用)
-g, --group group_id
可选参数,管理群设置(仅超级用户可用)
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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd3860861e41d4812b79d985e65b7002a7052b25b73adbc0027a8258897848ea |
|
MD5 | 4a00f26658572f0b8d75dcc022b0df57 |
|
BLAKE2b-256 | d53bf3d048cddbf1d6eda41252cbf3ea6e943a6cd96e6266711d1393b0ab09f0 |
Close
Hashes for nonebot_plugin_manager-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e184f2c22024b15bd50c8745c7b54c2a8573dd98442ead4e6fcadb99c4d401a6 |
|
MD5 | 2e0ad2842e6eb07d9180901bc2a4c652 |
|
BLAKE2b-256 | 25ea98637978d1c39539080c8809e48cfdb0f580e18f845e0ccc2e76eae8d65c |