Metadata-Version: 2.3
Name: nonebot-plugin-sensitive-lexicon
Version: 0.0.2
Summary: 
Author: zifox666
Author-email: zifox666 <zifox666@gmail.com>
Requires-Dist: nonebot-plugin-localstore>=0.7.4
Requires-Dist: nonebot2>=2.4.3,<3.0.0
Requires-Dist: nonebot-adapter-onebot>=2.4.6,<3.0.0
Requires-Dist: nonebot2[fastapi]>=2.4.2,<3.0.0
Requires-Dist: paddlepaddle==3.0.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: paddleocr>=2.10.0
Requires-Dist: setuptools>=81.0.0
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/zifox666/nonebot-plugin-sensitive-lexicon
Project-URL: Issues, https://github.com/zifox666/nonebot-plugin-sensitive-lexicon/issues
Project-URL: Repository, https://github.com/zifox666/nonebot-plugin-sensitive-lexicon.git
Description-Content-Type: text/markdown

<div align="center">
    <a href="https://v2.nonebot.dev/store">
    <img src="https://raw.githubusercontent.com/fllesser/nonebot-plugin-template/refs/heads/resource/.docs/NoneBotPlugin.svg" width="310" alt="logo"></a>

## ✨ nonebot-plugin-sensitive-lexicon ✨
[![LICENSE](https://img.shields.io/github/license/zifox666/nonebot-plugin-sensitive-lexicon.svg)](./LICENSE)
[![pypi](https://img.shields.io/pypi/v/nonebot-plugin-sensitive-lexicon.svg)](https://pypi.python.org/pypi/nonebot-plugin-sensitive-lexicon)
[![python](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org)
[![uv](https://img.shields.io/badge/package%20manager-uv-black?style=flat-square&logo=uv)](https://github.com/astral-sh/uv)
<br/>
[![ruff](https://img.shields.io/badge/code%20style-ruff-black?style=flat-square&logo=ruff)](https://github.com/astral-sh/ruff)
[![pre-commit](https://results.pre-commit.ci/badge/github/zifox666/nonebot-plugin-sensitive-lexicon/master.svg)](https://results.pre-commit.ci/latest/github/zifox666/nonebot-plugin-sensitive-lexicon/master)

</div>

## 📖 介绍

通过 [违禁词词库](https://github.com/konsheng/Sensitive-lexicon/) 审核群消息, 触犯规则后自动禁言或踢出, 可选禁止重新加群

## 💿 安装

<details open>
<summary>使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装

    nb plugin install nonebot-plugin-sensitive-lexicon --upgrade

</details>

<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令

<details open>
<summary>uv</summary>

    uv add nonebot-plugin-sensitive-lexicon
安装仓库 master 分支

    uv add git+https://github.com/zifox666/nonebot-plugin-sensitive-lexicon@master
</details>

<details>
<summary>pdm</summary>

    pdm add nonebot-plugin-sensitive-lexicon
安装仓库 master 分支

    pdm add git+https://github.com/zifox666/nonebot-plugin-sensitive-lexicon@master
</details>
<details>
<summary>poetry</summary>

    poetry add nonebot-plugin-sensitive-lexicon
安装仓库 master 分支

    poetry add git+https://github.com/zifox666/nonebot-plugin-sensitive-lexicon@master
</details>

打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入

    plugins = ["nonebot_plugin_sensitive_lexicon"]

</details>

<details>
<summary>使用 nbr 安装(使用 uv 管理依赖可用)</summary>

[nbr](https://github.com/fllesser/nbr) 是一个基于 uv 的 nb-cli，可以方便地管理 nonebot2

    nbr plugin install nonebot-plugin-sensitive-lexicon
使用 **pypi** 源安装

    nbr plugin install nonebot-plugin-sensitive-lexicon -i "https://pypi.org/simple"
使用**清华源**安装

    nbr plugin install nonebot-plugin-sensitive-lexicon -i "https://pypi.tuna.tsinghua.edu.cn/simple"

</details>


## ⚙️ 配置

在 nonebot2 项目的`.env`文件中添加下表中的必填配置

| 配置项  | 必填 | 默认值 |    说明     |
| :-----: |:--:|:---:|:---------:|
| KICK_COUNT | 否  |  5  | 触犯几次规则后踢人 |
| MUTE_DAY | 否  |  1  | 首次触发禁言天数  |
|REJECT_ADD_REQUEST|否|False| 踢出后禁止重新加群 |

## 🎉 使用
### 指令表
| 指令  | 权限  | 需要@ | 范围 |   说明   |
|:---:|:---:| :---: |:--:|:------:|
| esl | 管理员 |  否   | 群聊 | 开关本群审核 |

