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.post3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71f0257f3aaf417b32c5e18dd45107189caaebea3879930f6778cb3d303ec254 |
|
MD5 | 09ea09ae974bcc1586fbba712ea444ee |
|
BLAKE2b-256 | 4ed088135293b9d75b3717a1e2e3ed5354e6613fc7179190fa4ae2d4a2eb3d4d |
Close
Hashes for nonebot_plugin_manager-0.3.0.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ed5c255da27eb167367ab6c608d3b6a4128ce7711e6fc5e2eeb09af1a08018c |
|
MD5 | 9e218ef6c05dbe0c78f9f687ad6b1da6 |
|
BLAKE2b-256 | d2ee93faf2d5d996e5b29bc6090c7ac80cad3fe2a590c664d080635a395f926e |