nonebot-plugin-shutup


Namenonebot-plugin-shutup JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
Summary基于 NoneBot2 的 插件,用于机器人当前会话闭嘴
upload_time2024-11-07 10:49:15
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.8
licenseMIT
keywords nonebot2 plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- markdownlint-disable MD026 MD031 MD033 MD036 MD041 MD047 -->

<div align="center">

<a href="https://v2.nonebot.dev/store">
  <img src="https://raw.githubusercontent.com/Agnes4m/nonebot_plugin_l4d2_server/main/image/logo.png" width="180" height="180" alt="NoneBotPluginLogo">
</a>

<p>
  <img src="https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText">
</p>

# NoneBot-Plugin-Shutup

_✨ ~~雪豹闭嘴~~ ✨_

<img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">
<a href="https://pdm.fming.dev">
  <img src="https://img.shields.io/badge/pdm-managed-blueviolet" alt="pdm-managed">
</a>
<a href="https://jq.qq.com/?_wv=1027&k=HdjoCcAe">
  <img src="https://img.shields.io/badge/QQ%E7%BE%A4-424506063-orange" alt="QQ Chat Group">
</a>

<br />

<a href="./LICENSE">
  <img src="https://img.shields.io/github/license/Agnes4m/nonebot_plugin_pjsk.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-shutup">
  <img src="https://img.shields.io/pypi/v/nonebot-plugin-shutup.svg" alt="pypi">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-shutup">
  <img src="https://img.shields.io/pypi/dm/nonebot-plugin-shutup" alt="pypi download">
</a>

</div>

## 使用

在群里艾特机器人+`雪豹闭嘴` ,即可使机器人暂时屏蔽群内主动响应,任意适配器都可以使用。
![ex](./img/ex.png)

**仅限主动信息响应屏蔽,如果是其他插件的主动信息功能是无法屏蔽的,例如定时任务**

## 💿 安装

以下提到的方法 任选**其一** 即可

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

```bash
nb plugin install nonebot-plugin-shutup
```

</details>

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

<details>
<summary>pip</summary>

```bash
pip install nonebot-plugin-shutup
```

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

```bash
pdm add nonebot-plugin-shutup
```

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

```bash
poetry add nonebot-plugin-shutup
```

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

```bash
conda install nonebot-plugin-shutup
```

</details>

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

```toml
[tool.nonebot]
plugins = [
    # ...
    "nonebot_plugin_shutup"
]
```

</details>

## ⚙️ 配置

插件开箱即用,所有配置项皆为可选。请**按需添加**下面的配置项到 `.env` 文件中

|        配置项        | 必填 | 默认值  |     类型  |    说明   |
| :------------------: | :--: | :-----: |  :-------: | :---------------------------: |
| `shutup_tome` |  否  |   True   | bool |    是否需要艾特,设置为`False`则无需艾特   |
|  `shutup_name`  |  否  |   []   | List[str] |  需要名称,例如`xx闭嘴`,不设置则全部响应        |
| `shutup_time`  |  否  | `10` | int | 闭嘴时间,单位分钟,设置为0则不限时间 |
| `shutup_permission` |  int  | 0 | int  |    3:超级管理员,2:群主+,1:群管理员+,0:全体   |

## 不建议

不建议和以下插件混用,因为功能重复

- [指令阻断](https://github.com/KarisAya/nonebot_plugin_matcher_block)
- [黑名单](https://github.com/MerCuJerry/nonebot-plugin-blocker)

## 其他

- ~~[丁真同款电子烟](http://dian-zi-yan.com/index-cn.html)~~
- [爱发电](https://afdian.net/a/agnes_digital)
- [支付宝-蚂蚁森林-保护雪豹(手机打开)](https://render.alipay.com/p/s/i/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FappId%3D60000002%26url%3Dhttps%253A%252F%252Frender.alipay.com%252Fp%252Fyuyan%252F180020380000000248%252Fforest_home.html%253FcaprMode%253Dsync%2526forestId%253D4700082%26pullRefresh%3DNO%26canPullDown%3DNO%26backgroundColor%3D1381653%26transparentTitle%3Dauto%26source%3Dfxshexiangtoubaohudi%26fxzjshareChinfo%3Dch_share__chsub_CopyLink%26chInfo%3Dch_share__chsub_CopyLink%26apshareid%3D85c04233-69a5-4394-bd57-8d1c67a240f0%26shareBizType%3DztokenV0_kMglUpIE) 以下是作者保护雪豹的截图
![xuebao1](./img/xuebao1.jpg) ![xuebao2](./img/xuebao2.jpg)
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nonebot-plugin-shutup",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "nonebot2, plugin",
    "author": null,
    "author_email": "Agnes_Digital <Z735803792@163.com>",
    "download_url": "https://files.pythonhosted.org/packages/08/b0/e9f179e0d317d28aef4c0045960dfe637ea4c7f1f4cf79036d7f0e37a1ff/nonebot_plugin_shutup-0.1.0.tar.gz",
    "platform": null,
    "description": "<!-- markdownlint-disable MD026 MD031 MD033 MD036 MD041 MD047 -->\n\n<div align=\"center\">\n\n<a href=\"https://v2.nonebot.dev/store\">\n  <img src=\"https://raw.githubusercontent.com/Agnes4m/nonebot_plugin_l4d2_server/main/image/logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\">\n</a>\n\n<p>\n  <img src=\"https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\">\n</p>\n\n# NoneBot-Plugin-Shutup\n\n_\u2728 ~~\u96ea\u8c79\u95ed\u5634~~ \u2728_\n\n<img src=\"https://img.shields.io/badge/python-3.8+-blue.svg\" alt=\"python\">\n<a href=\"https://pdm.fming.dev\">\n  <img src=\"https://img.shields.io/badge/pdm-managed-blueviolet\" alt=\"pdm-managed\">\n</a>\n<a href=\"https://jq.qq.com/?_wv=1027&k=HdjoCcAe\">\n  <img src=\"https://img.shields.io/badge/QQ%E7%BE%A4-424506063-orange\" alt=\"QQ Chat Group\">\n</a>\n\n<br />\n\n<a href=\"./LICENSE\">\n  <img src=\"https://img.shields.io/github/license/Agnes4m/nonebot_plugin_pjsk.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-shutup\">\n  <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-shutup.svg\" alt=\"pypi\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-shutup\">\n  <img src=\"https://img.shields.io/pypi/dm/nonebot-plugin-shutup\" alt=\"pypi download\">\n</a>\n\n</div>\n\n## \u4f7f\u7528\n\n\u5728\u7fa4\u91cc\u827e\u7279\u673a\u5668\u4eba+`\u96ea\u8c79\u95ed\u5634` ,\u5373\u53ef\u4f7f\u673a\u5668\u4eba\u6682\u65f6\u5c4f\u853d\u7fa4\u5185\u4e3b\u52a8\u54cd\u5e94\uff0c\u4efb\u610f\u9002\u914d\u5668\u90fd\u53ef\u4ee5\u4f7f\u7528\u3002\n![ex](./img/ex.png)\n\n**\u4ec5\u9650\u4e3b\u52a8\u4fe1\u606f\u54cd\u5e94\u5c4f\u853d\uff0c\u5982\u679c\u662f\u5176\u4ed6\u63d2\u4ef6\u7684\u4e3b\u52a8\u4fe1\u606f\u529f\u80fd\u662f\u65e0\u6cd5\u5c4f\u853d\u7684\uff0c\u4f8b\u5982\u5b9a\u65f6\u4efb\u52a1**\n\n## \ud83d\udcbf \u5b89\u88c5\n\n\u4ee5\u4e0b\u63d0\u5230\u7684\u65b9\u6cd5 \u4efb\u9009**\u5176\u4e00** \u5373\u53ef\n\n<details open>\n<summary>[\u63a8\u8350] \u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\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```bash\nnb plugin install nonebot-plugin-shutup\n```\n\n</details>\n\n<details>\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u63d2\u4ef6\u76ee\u5f55\u4e0b, \u6253\u5f00\u547d\u4ee4\u884c, \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```bash\npip install nonebot-plugin-shutup\n```\n\n</details>\n<details>\n<summary>pdm</summary>\n\n```bash\npdm add nonebot-plugin-shutup\n```\n\n</details>\n<details>\n<summary>poetry</summary>\n\n```bash\npoetry add nonebot-plugin-shutup\n```\n\n</details>\n<details>\n<summary>conda</summary>\n\n```bash\nconda install nonebot-plugin-shutup\n```\n\n</details>\n\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u7684 `plugins` \u9879\u91cc\u8ffd\u52a0\u5199\u5165\n\n```toml\n[tool.nonebot]\nplugins = [\n    # ...\n    \"nonebot_plugin_shutup\"\n]\n```\n\n</details>\n\n## \u2699\ufe0f \u914d\u7f6e\n\n\u63d2\u4ef6\u5f00\u7bb1\u5373\u7528\uff0c\u6240\u6709\u914d\u7f6e\u9879\u7686\u4e3a\u53ef\u9009\u3002\u8bf7**\u6309\u9700\u6dfb\u52a0**\u4e0b\u9762\u7684\u914d\u7f6e\u9879\u5230 `.env` \u6587\u4ef6\u4e2d\n\n|        \u914d\u7f6e\u9879        | \u5fc5\u586b | \u9ed8\u8ba4\u503c  |     \u7c7b\u578b  |    \u8bf4\u660e   |\n| :------------------: | :--: | :-----: |  :-------: | :---------------------------: |\n| `shutup_tome` |  \u5426  |   True   | bool |    \u662f\u5426\u9700\u8981\u827e\u7279,\u8bbe\u7f6e\u4e3a`False`\u5219\u65e0\u9700\u827e\u7279   |\n|  `shutup_name`  |  \u5426  |   []   | List[str] |  \u9700\u8981\u540d\u79f0\uff0c\u4f8b\u5982`xx\u95ed\u5634`,\u4e0d\u8bbe\u7f6e\u5219\u5168\u90e8\u54cd\u5e94        |\n| `shutup_time`  |  \u5426  | `10` | int | \u95ed\u5634\u65f6\u95f4\uff0c\u5355\u4f4d\u5206\u949f,\u8bbe\u7f6e\u4e3a0\u5219\u4e0d\u9650\u65f6\u95f4 |\n| `shutup_permission` |  int  | 0 | int  |    3:\u8d85\u7ea7\u7ba1\u7406\u5458,2:\u7fa4\u4e3b+,1:\u7fa4\u7ba1\u7406\u5458+,0:\u5168\u4f53   |\n\n## \u4e0d\u5efa\u8bae\n\n\u4e0d\u5efa\u8bae\u548c\u4ee5\u4e0b\u63d2\u4ef6\u6df7\u7528,\u56e0\u4e3a\u529f\u80fd\u91cd\u590d\n\n- [\u6307\u4ee4\u963b\u65ad](https://github.com/KarisAya/nonebot_plugin_matcher_block)\n- [\u9ed1\u540d\u5355](https://github.com/MerCuJerry/nonebot-plugin-blocker)\n\n## \u5176\u4ed6\n\n- ~~[\u4e01\u771f\u540c\u6b3e\u7535\u5b50\u70df](http://dian-zi-yan.com/index-cn.html)~~\n- [\u7231\u53d1\u7535](https://afdian.net/a/agnes_digital)\n- [\u652f\u4ed8\u5b9d-\u8682\u8681\u68ee\u6797-\u4fdd\u62a4\u96ea\u8c79(\u624b\u673a\u6253\u5f00)](https://render.alipay.com/p/s/i/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FappId%3D60000002%26url%3Dhttps%253A%252F%252Frender.alipay.com%252Fp%252Fyuyan%252F180020380000000248%252Fforest_home.html%253FcaprMode%253Dsync%2526forestId%253D4700082%26pullRefresh%3DNO%26canPullDown%3DNO%26backgroundColor%3D1381653%26transparentTitle%3Dauto%26source%3Dfxshexiangtoubaohudi%26fxzjshareChinfo%3Dch_share__chsub_CopyLink%26chInfo%3Dch_share__chsub_CopyLink%26apshareid%3D85c04233-69a5-4394-bd57-8d1c67a240f0%26shareBizType%3DztokenV0_kMglUpIE) \u4ee5\u4e0b\u662f\u4f5c\u8005\u4fdd\u62a4\u96ea\u8c79\u7684\u622a\u56fe\n![xuebao1](./img/xuebao1.jpg) ![xuebao2](./img/xuebao2.jpg)",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "\u57fa\u4e8e NoneBot2 \u7684 \u63d2\u4ef6\uff0c\u7528\u4e8e\u673a\u5668\u4eba\u5f53\u524d\u4f1a\u8bdd\u95ed\u5634",
    "version": "0.1.0",
    "project_urls": {
        "homepage": "https://github.com/Agnes4m/nonebot_pluigin_shutup"
    },
    "split_keywords": [
        "nonebot2",
        " plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "379200874c49ca0f43dfa69ede982f7690288d94be9939ed046ec7b63919ae55",
                "md5": "73f598e16bd17bc9380ff144b876af81",
                "sha256": "07526ce8219b18c6bd28d263db677b7851d0ccbf5b367745b4bacfbb8c29fff1"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_shutup-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "73f598e16bd17bc9380ff144b876af81",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 6744,
            "upload_time": "2024-11-07T10:49:14",
            "upload_time_iso_8601": "2024-11-07T10:49:14.629136Z",
            "url": "https://files.pythonhosted.org/packages/37/92/00874c49ca0f43dfa69ede982f7690288d94be9939ed046ec7b63919ae55/nonebot_plugin_shutup-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08b0e9f179e0d317d28aef4c0045960dfe637ea4c7f1f4cf79036d7f0e37a1ff",
                "md5": "98e1958e74ac8644912bf6f0ed12a246",
                "sha256": "dc9085204c0822da9b03ff7df089015a8e2619295c7d063a2c3b090961345b04"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_shutup-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "98e1958e74ac8644912bf6f0ed12a246",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 5358,
            "upload_time": "2024-11-07T10:49:15",
            "upload_time_iso_8601": "2024-11-07T10:49:15.457939Z",
            "url": "https://files.pythonhosted.org/packages/08/b0/e9f179e0d317d28aef4c0045960dfe637ea4c7f1f4cf79036d7f0e37a1ff/nonebot_plugin_shutup-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-07 10:49:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Agnes4m",
    "github_project": "nonebot_pluigin_shutup",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-plugin-shutup"
}
        
Elapsed time: 0.57553s