Metadata-Version: 2.1
Name: nonebot-plugin-manager
Version: 0.3.0.post4
Summary: Nonebot Plugin Manager base on import hook
Home-page: https://github.com/Jigsaw111/nonebot_plugin_manager
License: MIT
Author: Jigsaw
Author-email: j1g5aw@foxmail.com
Requires-Python: >=3.7.3,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: nonebot-adapter-cqhttp (>=2.0.0a11.post2,<3.0.0)
Requires-Dist: nonebot2 (>=2.0.0-alpha.11,<3.0.0)
Project-URL: Repository, https://github.com/Jigsaw111/nonebot_plugin_manager
Description-Content-Type: text/markdown

# Nonebot Plugin Manager

*适用于 [nonebot2](https://github.com/nonebot/nonebot2) 以及 [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 的插件管理器*

[![License](https://img.shields.io/github/license/Jigsaw111/nonebot_plugin_manager)](LICENSE)
![Python Version](https://img.shields.io/badge/python-3.7.3+-blue.svg)
![NoneBot Version](https://img.shields.io/badge/nonebot-2.0.0a11+-red.svg)
![Pypi Version](https://img.shields.io/pypi/v/nonebot-plugin-manager.svg)

### 安装

* 使用nb-cli（推荐）  

```bash
nb plugin install nonebot_plugin_manager
```

* 使用poetry

```bash
poetry add nonebot_plugin_manager
```

### 开始使用

**使用前请先确保命令前缀设置为空，否则请在以下命令前加上自己的命令前缀 (默认为 `/` )。**

`npm list` 查看插件列表

`npm block 插件名...` 屏蔽插件 （仅群管及超级用户可用）

`npm unblock 插件名...` 启用插件 （仅群管及超级用户可用）

`-a, --all` 可选参数，全选插件 （仅群管及超级用户可用）

`-d, --default` 可选参数，管理默认设置 （仅超级用户可用）

`-g, --group group_id` 可选参数，管理群设置（仅超级用户可用）

### TO DO

- [x] 分群插件管理
- [ ] 调用 nb-cli 安装卸载插件

<details>
<summary>展开更多</summary>

### 原理

使用 `run_preprocessor` 装饰器，在 Matcher 运行之前检测其所属的 Plugin 判断是否打断。

事实上 Nonebot 还是加载了插件，所以只能算是**屏蔽**而非**卸载**。

### Bug

- [ ] 无法停用 Matcher 以外的功能（也就是说无法屏蔽主动发消息的插件，例如 Harukabot ）。
- [x] 目前任何人都可以管理插件

</details>
