Skip to main content

Plugin Manager base on import hook

Project description

Nonebot Plugin Manager

适用于 nonebot2 以及 go-cqhttp 的插件管理器

License Python Version NoneBot Version Pypi Version

安装

  • 使用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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_manager-0.2.4.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_manager-0.2.4-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page