nonebot-plugin-antiinsult


Namenonebot-plugin-antiinsult JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/tkgs0/nonebot-plugin-antiinsult
SummaryAnti-insult in NoneBot2
upload_time2023-12-30 08:43:37
maintainer
docs_urlNone
author月ヶ瀬
requires_python>=3.8,<4.0
licenseMIT
keywords nonebot anti-insult anti-abuse
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <a href="https://v2.nonebot.dev/store"><img src="https://raw.githubusercontent.com/tkgs0/nbpt/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
  <br>
  <p><img src="https://raw.githubusercontent.com/tkgs0/nbpt/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>

<div align="center">

# nonebot-plugin-antiinsult
  
_✨ NoneBot 反嘴臭插件 ✨_
  

<a href="./LICENSE">
    <img src="https://img.shields.io/github/license/tkgs0/nonebot-plugin-antiinsult.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-antiinsult">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-antiinsult.svg" alt="pypi">
</a>
<a href="https://www.python.org">
    <img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">
</a>

</div>

  
## 📖 介绍
  
**本插件为被动插件**  
  
检测到有用户 `@机器人` 并嘴臭时将其临时屏蔽(bot重启后失效)  
当bot为群管理时会请对方喝昏睡红茶(禁言)  
  
- 超级用户不受临时屏蔽影响 _~~但是会被昏睡红茶影响~~_  
- 当bot的群权限比超级用户高的时候, 超级用户也有机会品尝昏睡红茶  
- 被bot灌了昏睡红茶的用户不会进临时黑名单  
- 开启 **`对线模式`** 后不会被bot灌昏睡红茶和临时拉黑 (~~因为要对线~~)  
  
  
## 💿 安装

**nb-cli安装, 包管理器安装  二选一**

<details>
<summary>使用 nb-cli 安装</summary>

在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装

    nb plugin install nonebot-plugin-antiinsult

</details>

<details>
<summary>使用包管理器安装</summary>

在 nonebot2 项目的插件目录下, 打开命令行,

**根据你使用的包管理器, 输入相应的安装命令**

<details>
<summary>pip</summary>

    pip install nonebot-plugin-antiinsult

</details>
<details>
<summary>pdm</summary>

    pdm add nonebot-plugin-antiinsult

</details>
<details>
<summary>poetry</summary>

    poetry add nonebot-plugin-antiinsult

</details>
<details>
<summary>conda</summary>

    conda install nonebot-plugin-antiinsult

</details>

打开 bot项目下的 `pyproject.toml` 文件,

在其 `plugins` 里加入 `nonebot_plugin_antiinsult`

    plugins = ["nonebot_plugin_antiinsult"]

</details>
</details>

## 🎉 使用

在Bot目录下的 `.env` 文件内可添加以下变量以设置禁言时长:

```env
ANTI_INSULT_BAN_TIME=720
```

单位为分钟, 默认值720分钟(12小时)

### 指令表

<table> 
  <tr align="center">
    <th> 指令 </th>
    <th> 权限 </th>
    <th> 需要@ </th>
    <th> 范围 </th>
    <th> 说明 </th>
  </tr>
  <tr align="center">
    <td> ^(添加|删除)屏蔽词 xxx </td>
    <td> 主人 </td>
    <td> 否 </td>
    <td> 私聊 | 群聊 </td>
    <td rowspan="2"> 可输入多个,<br>用空格隔开 </td>
  </tr>
  <tr align="center">
    <td> 解除屏蔽 qq </td>
    <td> 主人 </td>
    <td> 否 </td>
    <td> 私聊 | 群聊 </td>
  </tr>
  <tr align="center">
    <td> 查看临时黑名单 </td>
    <td> 主人 </td>
    <td> 否 </td>
    <td> 私聊 | 群聊 </td>
    <td> </td>
  </tr>
  <tr align="center">
    <td> ^(禁用|启用)飞(妈|马|🐴|🐎)令 </td>
    <td> 主人 </td>
    <td> 否 </td>
    <td> 私聊 | 群聊 </td>
    <td> 开启/关闭对线模式 </td>
</table>

P.S. `解除屏蔽` 可以解除临时屏蔽, 也可以解除禁言(当然, 需要bot为群管理).  
  
你说从聊天界面查看屏蔽词库? 噢, 我亲爱的老伙计, 你怕是疯了!  
  


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tkgs0/nonebot-plugin-antiinsult",
    "name": "nonebot-plugin-antiinsult",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "nonebot,anti-insult,anti-abuse",
    "author": "\u6708\u30f6\u702c",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/9a/0c/3419dd5f6a45ab29ec94038c79af17873f2184759258db039e1cb2403a40/nonebot_plugin_antiinsult-0.6.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://raw.githubusercontent.com/tkgs0/nbpt/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n  <br>\n  <p><img src=\"https://raw.githubusercontent.com/tkgs0/nbpt/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-antiinsult\n  \n_\u2728 NoneBot \u53cd\u5634\u81ed\u63d2\u4ef6 \u2728_\n  \n\n<a href=\"./LICENSE\">\n    <img src=\"https://img.shields.io/github/license/tkgs0/nonebot-plugin-antiinsult.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-antiinsult\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-antiinsult.svg\" alt=\"pypi\">\n</a>\n<a href=\"https://www.python.org\">\n    <img src=\"https://img.shields.io/badge/python-3.8+-blue.svg\" alt=\"python\">\n</a>\n\n</div>\n\n  \n## \ud83d\udcd6 \u4ecb\u7ecd\n  \n**\u672c\u63d2\u4ef6\u4e3a\u88ab\u52a8\u63d2\u4ef6**  \n  \n\u68c0\u6d4b\u5230\u6709\u7528\u6237 `@\u673a\u5668\u4eba` \u5e76\u5634\u81ed\u65f6\u5c06\u5176\u4e34\u65f6\u5c4f\u853d(bot\u91cd\u542f\u540e\u5931\u6548)  \n\u5f53bot\u4e3a\u7fa4\u7ba1\u7406\u65f6\u4f1a\u8bf7\u5bf9\u65b9\u559d\u660f\u7761\u7ea2\u8336(\u7981\u8a00)  \n  \n- \u8d85\u7ea7\u7528\u6237\u4e0d\u53d7\u4e34\u65f6\u5c4f\u853d\u5f71\u54cd _~~\u4f46\u662f\u4f1a\u88ab\u660f\u7761\u7ea2\u8336\u5f71\u54cd~~_  \n- \u5f53bot\u7684\u7fa4\u6743\u9650\u6bd4\u8d85\u7ea7\u7528\u6237\u9ad8\u7684\u65f6\u5019, \u8d85\u7ea7\u7528\u6237\u4e5f\u6709\u673a\u4f1a\u54c1\u5c1d\u660f\u7761\u7ea2\u8336  \n- \u88abbot\u704c\u4e86\u660f\u7761\u7ea2\u8336\u7684\u7528\u6237\u4e0d\u4f1a\u8fdb\u4e34\u65f6\u9ed1\u540d\u5355  \n- \u5f00\u542f **`\u5bf9\u7ebf\u6a21\u5f0f`** \u540e\u4e0d\u4f1a\u88abbot\u704c\u660f\u7761\u7ea2\u8336\u548c\u4e34\u65f6\u62c9\u9ed1 (~~\u56e0\u4e3a\u8981\u5bf9\u7ebf~~)  \n  \n  \n## \ud83d\udcbf \u5b89\u88c5\n\n**nb-cli\u5b89\u88c5, \u5305\u7ba1\u7406\u5668\u5b89\u88c5  \u4e8c\u9009\u4e00**\n\n<details>\n<summary>\u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\n\n\u5728 nonebot2 \u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u6253\u5f00\u547d\u4ee4\u884c, \u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u5373\u53ef\u5b89\u88c5\n\n    nb plugin install nonebot-plugin-antiinsult\n\n</details>\n\n<details>\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\n\n\u5728 nonebot2 \u9879\u76ee\u7684\u63d2\u4ef6\u76ee\u5f55\u4e0b, \u6253\u5f00\u547d\u4ee4\u884c,\n\n**\u6839\u636e\u4f60\u4f7f\u7528\u7684\u5305\u7ba1\u7406\u5668, \u8f93\u5165\u76f8\u5e94\u7684\u5b89\u88c5\u547d\u4ee4**\n\n<details>\n<summary>pip</summary>\n\n    pip install nonebot-plugin-antiinsult\n\n</details>\n<details>\n<summary>pdm</summary>\n\n    pdm add nonebot-plugin-antiinsult\n\n</details>\n<details>\n<summary>poetry</summary>\n\n    poetry add nonebot-plugin-antiinsult\n\n</details>\n<details>\n<summary>conda</summary>\n\n    conda install nonebot-plugin-antiinsult\n\n</details>\n\n\u6253\u5f00 bot\u9879\u76ee\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6,\n\n\u5728\u5176 `plugins` \u91cc\u52a0\u5165 `nonebot_plugin_antiinsult`\n\n    plugins = [\"nonebot_plugin_antiinsult\"]\n\n</details>\n</details>\n\n## \ud83c\udf89 \u4f7f\u7528\n\n\u5728Bot\u76ee\u5f55\u4e0b\u7684 `.env` \u6587\u4ef6\u5185\u53ef\u6dfb\u52a0\u4ee5\u4e0b\u53d8\u91cf\u4ee5\u8bbe\u7f6e\u7981\u8a00\u65f6\u957f:\n\n```env\nANTI_INSULT_BAN_TIME=720\n```\n\n\u5355\u4f4d\u4e3a\u5206\u949f, \u9ed8\u8ba4\u503c720\u5206\u949f(12\u5c0f\u65f6)\n\n### \u6307\u4ee4\u8868\n\n<table> \n  <tr align=\"center\">\n    <th> \u6307\u4ee4 </th>\n    <th> \u6743\u9650 </th>\n    <th> \u9700\u8981@ </th>\n    <th> \u8303\u56f4 </th>\n    <th> \u8bf4\u660e </th>\n  </tr>\n  <tr align=\"center\">\n    <td> ^(\u6dfb\u52a0|\u5220\u9664)\u5c4f\u853d\u8bcd xxx </td>\n    <td> \u4e3b\u4eba </td>\n    <td> \u5426 </td>\n    <td> \u79c1\u804a | \u7fa4\u804a </td>\n    <td rowspan=\"2\"> \u53ef\u8f93\u5165\u591a\u4e2a,<br>\u7528\u7a7a\u683c\u9694\u5f00 </td>\n  </tr>\n  <tr align=\"center\">\n    <td> \u89e3\u9664\u5c4f\u853d qq </td>\n    <td> \u4e3b\u4eba </td>\n    <td> \u5426 </td>\n    <td> \u79c1\u804a | \u7fa4\u804a </td>\n  </tr>\n  <tr align=\"center\">\n    <td> \u67e5\u770b\u4e34\u65f6\u9ed1\u540d\u5355 </td>\n    <td> \u4e3b\u4eba </td>\n    <td> \u5426 </td>\n    <td> \u79c1\u804a | \u7fa4\u804a </td>\n    <td> </td>\n  </tr>\n  <tr align=\"center\">\n    <td> ^(\u7981\u7528|\u542f\u7528)\u98de(\u5988|\u9a6c|\ud83d\udc34|\ud83d\udc0e)\u4ee4 </td>\n    <td> \u4e3b\u4eba </td>\n    <td> \u5426 </td>\n    <td> \u79c1\u804a | \u7fa4\u804a </td>\n    <td> \u5f00\u542f/\u5173\u95ed\u5bf9\u7ebf\u6a21\u5f0f </td>\n</table>\n\nP.S. `\u89e3\u9664\u5c4f\u853d` \u53ef\u4ee5\u89e3\u9664\u4e34\u65f6\u5c4f\u853d, \u4e5f\u53ef\u4ee5\u89e3\u9664\u7981\u8a00(\u5f53\u7136, \u9700\u8981bot\u4e3a\u7fa4\u7ba1\u7406).  \n  \n\u4f60\u8bf4\u4ece\u804a\u5929\u754c\u9762\u67e5\u770b\u5c4f\u853d\u8bcd\u5e93? \u5662, \u6211\u4eb2\u7231\u7684\u8001\u4f19\u8ba1, \u4f60\u6015\u662f\u75af\u4e86!  \n  \n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Anti-insult in NoneBot2",
    "version": "0.6.0",
    "project_urls": {
        "Homepage": "https://github.com/tkgs0/nonebot-plugin-antiinsult",
        "Repository": "https://github.com/tkgs0/nonebot-plugin-antiinsult"
    },
    "split_keywords": [
        "nonebot",
        "anti-insult",
        "anti-abuse"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6b24c7c13bc92bbf13a38286150312a2ef6f6ecbad308b8508c666d4ff3fcb4",
                "md5": "c9b42c41da33fac575784d23c3c1997e",
                "sha256": "b768af410f9381d714ca6455286425c3eff180ea7585ede4972b0964a01ca169"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_antiinsult-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c9b42c41da33fac575784d23c3c1997e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 13642,
            "upload_time": "2023-12-30T08:43:35",
            "upload_time_iso_8601": "2023-12-30T08:43:35.533349Z",
            "url": "https://files.pythonhosted.org/packages/c6/b2/4c7c13bc92bbf13a38286150312a2ef6f6ecbad308b8508c666d4ff3fcb4/nonebot_plugin_antiinsult-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9a0c3419dd5f6a45ab29ec94038c79af17873f2184759258db039e1cb2403a40",
                "md5": "871bfaa9f4ff3467d8c31bc987d43d94",
                "sha256": "38fa5979f2dfc30b748e89193af91917eaa5fa119dd25a4042ba84730376a8bc"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_antiinsult-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "871bfaa9f4ff3467d8c31bc987d43d94",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 14117,
            "upload_time": "2023-12-30T08:43:37",
            "upload_time_iso_8601": "2023-12-30T08:43:37.163549Z",
            "url": "https://files.pythonhosted.org/packages/9a/0c/3419dd5f6a45ab29ec94038c79af17873f2184759258db039e1cb2403a40/nonebot_plugin_antiinsult-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-30 08:43:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tkgs0",
    "github_project": "nonebot-plugin-antiinsult",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-plugin-antiinsult"
}
        
Elapsed time: 0.15477s