nonebot-plugin-blocker


Namenonebot-plugin-blocker JSON
Version 0.4.8 PyPI version JSON
download
home_pagehttps://github.com/MerCuJerry/nonebot-plugin-blocker
SummaryMessage Blocker
upload_time2024-04-07 11:20:59
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.8
licenseMIT License Copyright (c) 2023 MerCuJerry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords nonebot nonebot2 qqbot bot
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://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
  <br>
  <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>

<div align="center">

# nonebot-plugin-blocker

_✨ NoneBot Plugin Blocker ✨_


<a href="./LICENSE">
    <img src="https://img.shields.io/github/license/MerCuJerry/nonebot-plugin-blocker.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-blocker">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-blocker.svg" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">
<a href="https://pypi.python.org/pypi/nonebot-plugin-blocker" rel="nofollow">
    <img alt="pypi download" src="https://img.shields.io/pypi/dm/nonebot-plugin-blocker" style="max-width: 100%;">
</a>
</div>

## 📖 介绍

这是一个 nonebot2 插件项目,用于分群配置机器人的开启关闭

插件提供了一个简单的WebUI来让你配置Bot的开关指令以及对指令做出的回复。

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

<details>
<summary>pip</summary>

    pip install nonebot-plugin-blocker
</details>

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

    plugins = ["nonebot_plugin_blocker"]

</details>

## ⚙️ 配置

### 常规配置项,位于.env文件里

```ini
#WebUI的登录凭证,不设置即不进行验证
BLOCKER_WEBUI_USERNAME=""
BLOCKER_WEBUI_PASSWORD=""
#Blocker插件的配置存放位置,留空则为默认./data/blocker
blocker_data_path=""
```

### 其他配置项

插件的回复配置文件位于 `data/blocker/config.json` 里,不建议手动更改

`data/blocker/blocklist.json` 里是已经加入名单的群号,可以在关闭nonebot之后手动编辑

## 💬 指令

指令只有管理员,群主以及Bot的SUPERUSER能够使用

### .bot on在该群开启bot

### .bot off在该群关闭bot

### 在上述指令后at特定bot将关闭使用了本插件的特定Bot,不会影响使用本插件的其他Bot

### 如果你在WebUI设置了指令|回复那么指令|回复将会是你设置的文本

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MerCuJerry/nonebot-plugin-blocker",
    "name": "nonebot-plugin-blocker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "nonebot nonebot2 qqbot bot",
    "author": null,
    "author_email": "MerCuJerry <mercujerry@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3b/a0/936e2187e0ffc0cd38928b33e4c572f88aa277e5cfc7f47be4349b148410/nonebot_plugin_blocker-0.4.8.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n  <br>\n  <p><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-blocker\n\n_\u2728 NoneBot Plugin Blocker \u2728_\n\n\n<a href=\"./LICENSE\">\n    <img src=\"https://img.shields.io/github/license/MerCuJerry/nonebot-plugin-blocker.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-blocker\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-blocker.svg\" alt=\"pypi\">\n</a>\n<img src=\"https://img.shields.io/badge/python-3.8+-blue.svg\" alt=\"python\">\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-blocker\" rel=\"nofollow\">\n    <img alt=\"pypi download\" src=\"https://img.shields.io/pypi/dm/nonebot-plugin-blocker\" style=\"max-width: 100%;\">\n</a>\n</div>\n\n## \ud83d\udcd6 \u4ecb\u7ecd\n\n\u8fd9\u662f\u4e00\u4e2a nonebot2 \u63d2\u4ef6\u9879\u76ee\uff0c\u7528\u4e8e\u5206\u7fa4\u914d\u7f6e\u673a\u5668\u4eba\u7684\u5f00\u542f\u5173\u95ed\n\n\u63d2\u4ef6\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684WebUI\u6765\u8ba9\u4f60\u914d\u7f6eBot\u7684\u5f00\u5173\u6307\u4ee4\u4ee5\u53ca\u5bf9\u6307\u4ee4\u505a\u51fa\u7684\u56de\u590d\u3002\n\n## \ud83d\udcbf \u5b89\u88c5\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    pip install nonebot-plugin-blocker\n</details>\n\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u8ffd\u52a0\u5199\u5165\n\n    plugins = [\"nonebot_plugin_blocker\"]\n\n</details>\n\n## \u2699\ufe0f \u914d\u7f6e\n\n### \u5e38\u89c4\u914d\u7f6e\u9879\uff0c\u4f4d\u4e8e.env\u6587\u4ef6\u91cc\n\n```ini\n#WebUI\u7684\u767b\u5f55\u51ed\u8bc1\uff0c\u4e0d\u8bbe\u7f6e\u5373\u4e0d\u8fdb\u884c\u9a8c\u8bc1\nBLOCKER_WEBUI_USERNAME=\"\"\nBLOCKER_WEBUI_PASSWORD=\"\"\n#Blocker\u63d2\u4ef6\u7684\u914d\u7f6e\u5b58\u653e\u4f4d\u7f6e\uff0c\u7559\u7a7a\u5219\u4e3a\u9ed8\u8ba4./data/blocker\nblocker_data_path=\"\"\n```\n\n### \u5176\u4ed6\u914d\u7f6e\u9879\n\n\u63d2\u4ef6\u7684\u56de\u590d\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e `data/blocker/config.json` \u91cc\uff0c\u4e0d\u5efa\u8bae\u624b\u52a8\u66f4\u6539\n\n`data/blocker/blocklist.json` \u91cc\u662f\u5df2\u7ecf\u52a0\u5165\u540d\u5355\u7684\u7fa4\u53f7\uff0c\u53ef\u4ee5\u5728\u5173\u95ednonebot\u4e4b\u540e\u624b\u52a8\u7f16\u8f91\n\n## \ud83d\udcac \u6307\u4ee4\n\n\u6307\u4ee4\u53ea\u6709\u7ba1\u7406\u5458\uff0c\u7fa4\u4e3b\u4ee5\u53caBot\u7684SUPERUSER\u80fd\u591f\u4f7f\u7528\n\n### .bot on\u5728\u8be5\u7fa4\u5f00\u542fbot\n\n### .bot off\u5728\u8be5\u7fa4\u5173\u95edbot\n\n### \u5728\u4e0a\u8ff0\u6307\u4ee4\u540eat\u7279\u5b9abot\u5c06\u5173\u95ed\u4f7f\u7528\u4e86\u672c\u63d2\u4ef6\u7684\u7279\u5b9aBot\uff0c\u4e0d\u4f1a\u5f71\u54cd\u4f7f\u7528\u672c\u63d2\u4ef6\u7684\u5176\u4ed6Bot\n\n### \u5982\u679c\u4f60\u5728WebUI\u8bbe\u7f6e\u4e86\u6307\u4ee4|\u56de\u590d\u90a3\u4e48\u6307\u4ee4|\u56de\u590d\u5c06\u4f1a\u662f\u4f60\u8bbe\u7f6e\u7684\u6587\u672c\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2023 MerCuJerry\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Message Blocker",
    "version": "0.4.8",
    "project_urls": {
        "Homepage": "https://github.com/MerCuJerry/nonebot-plugin-blocker"
    },
    "split_keywords": [
        "nonebot",
        "nonebot2",
        "qqbot",
        "bot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "496dcfd4fbc7d5133361374318b5c899830f5ed13c629f014189f5fb6b2b3948",
                "md5": "b21a29881d4ecb1d46abf1f74286dc56",
                "sha256": "ce371b08a773e8fd6e4acfb35a6e074e96b6c3e01391e0f62f3ada6384f3f4f4"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_blocker-0.4.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b21a29881d4ecb1d46abf1f74286dc56",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 11363,
            "upload_time": "2024-04-07T11:20:57",
            "upload_time_iso_8601": "2024-04-07T11:20:57.942379Z",
            "url": "https://files.pythonhosted.org/packages/49/6d/cfd4fbc7d5133361374318b5c899830f5ed13c629f014189f5fb6b2b3948/nonebot_plugin_blocker-0.4.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ba0936e2187e0ffc0cd38928b33e4c572f88aa277e5cfc7f47be4349b148410",
                "md5": "d53985b6941c4d0b6c27ff8f63f9d378",
                "sha256": "7cdd08e73bab04564c1cab9f690ebcdf0e95bb7431028200f684fc917c362b47"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_blocker-0.4.8.tar.gz",
            "has_sig": false,
            "md5_digest": "d53985b6941c4d0b6c27ff8f63f9d378",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 10040,
            "upload_time": "2024-04-07T11:20:59",
            "upload_time_iso_8601": "2024-04-07T11:20:59.868076Z",
            "url": "https://files.pythonhosted.org/packages/3b/a0/936e2187e0ffc0cd38928b33e4c572f88aa277e5cfc7f47be4349b148410/nonebot_plugin_blocker-0.4.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-07 11:20:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MerCuJerry",
    "github_project": "nonebot-plugin-blocker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-plugin-blocker"
}
        
Elapsed time: 0.20104s