Name | nonebot-plugin-mmm JSON |
Version |
0.2.3
JSON |
| download |
home_page | None |
Summary | Bot的消息也是消息! |
upload_time | 2024-12-16 05:42:40 |
maintainer | None |
docs_url | None |
author | eya46 |
requires_python | <4.0,>=3.9 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<a href="https://nonebot.dev/"><img src="https://nonebot.dev/logo.png" width="200" height="200" alt="nonebot"></a>
</p>
<div align="center">
# NoneBot Plugin MMM
![License](https://img.shields.io/github/license/eya46/nonebot-plugin-mmm)
![Python](https://img.shields.io/badge/python-3.9+-blue.svg)
![NoneBot](https://img.shields.io/badge/nonebot-2.3.0+-red.svg)
</div>
<div align="center">
![:eya46](https://count.getloli.com/get/@:eya46-plugin-mmm?theme=gelbooru)
</div>
## 作用
让 `onebot v11` 协议中 `bot` 的消息作为正常事件进行处理
> 使用 `plugin-alconna` 记得添加 `ALCONNA_RESPONSE_SELF=True` 配置
>
> 原因: https://github.com/nonebot/plugin-alconna/releases/tag/v0.53.0
## 注意事项
> [!WARNING]
> - 小心死循环!
> - 在 `PrivateMessageEvent` 事件中, 使用 `send_msg` 给bot自己发消息会重定向到 `target_id`(如果存在的话)
> - 请使用 `send_private_msg` 给bot自己发消息
## 安装方式
### 依赖管理
- `pip install nonebot-plugin-mmm`
- `poetry add nonebot-plugin-mmm`
- `pdm add nonebot-plugin-mmm`
> 在 `bot.py` 中添加 `nonebot.load_plugin("nonebot_plugin_mmm")`
### nb-cli
- `nb plugin install nonebot-plugin-mmm`
## 配置项
### 非必要配置项
- `mmm_block`: 是否block `message_sent` 后续matcher, 默认为 `True`
- `mmm_priority`: on `message_sent` 的优先级, 默认为 `0`
- `mmm_private`: 是否处理私聊消息, 默认为 `True`
- `mmm_group`: 是否处理群聊消息, 默认为 `True`
- `mmm_self`: 是否处理自己发给自己的消息, 默认为 `False`
- `mmm_only_text`: 是否只处理文本消息, 默认为 `False`
- `mmm_text_check`: 是否只处理符合指定开头的消息, 默认为 `False`
- `mmm_use_nb_start` 是否使用 `nonebot2` 的 `COMMAND_START`, 默认为 `False`
- `mmm_text_start`: 检查的消息开头, 默认为 `{"",}` 即任何消息都通过
- `mmm_lstrip`: 是否去除消息前缀, 默认为 `False`
- `mmm_lstrip_num`: 去除消息前缀的数量, 默认为 `1`
```toml
mmm_block = True
mmm_priority = 0
mmm_private = True
mmm_group = True
mmm_self = False
mmm_only_text = False # 只处理文本消息
mmm_text_check = False # 只处理符合指定开头的消息
mmm_use_nb_start = False # 使用 nonebot2 的 COMMAND_START
mmm_text_start = [".", "/"] # 检查的消息开头 默认为 ["",] 即任何消息都通过
mmm_lstrip = False # 去除消息前缀
mmm_lstrip_num = 1 # 去除消息前缀的数量
```
## 依赖项
```toml
python = "^3.9"
nonebot2 = "^2.3.0"
nonebot-adapter-onebot = "^2.1.0"
```
Raw data
{
"_id": null,
"home_page": null,
"name": "nonebot-plugin-mmm",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "eya46",
"author_email": "61458340+eya46@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/52/2a/0ab0a45a242db6dbc6c91073ee5adcd895db44c7b0f7eb15b8f34b48b097/nonebot_plugin_mmm-0.2.3.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <a href=\"https://nonebot.dev/\"><img src=\"https://nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"></a>\n</p>\n\n<div align=\"center\">\n\n# NoneBot Plugin MMM\n\n![License](https://img.shields.io/github/license/eya46/nonebot-plugin-mmm)\n![Python](https://img.shields.io/badge/python-3.9+-blue.svg)\n![NoneBot](https://img.shields.io/badge/nonebot-2.3.0+-red.svg)\n</div>\n\n<div align=\"center\">\n\n![:eya46](https://count.getloli.com/get/@:eya46-plugin-mmm?theme=gelbooru)\n\n</div>\n\n## \u4f5c\u7528\n\n\u8ba9 `onebot v11` \u534f\u8bae\u4e2d `bot` \u7684\u6d88\u606f\u4f5c\u4e3a\u6b63\u5e38\u4e8b\u4ef6\u8fdb\u884c\u5904\u7406\n\n> \u4f7f\u7528 `plugin-alconna` \u8bb0\u5f97\u6dfb\u52a0 `ALCONNA_RESPONSE_SELF=True` \u914d\u7f6e\n>\n> \u539f\u56e0: https://github.com/nonebot/plugin-alconna/releases/tag/v0.53.0\n\n## \u6ce8\u610f\u4e8b\u9879\n> [!WARNING]\n> - \u5c0f\u5fc3\u6b7b\u5faa\u73af\uff01\n> - \u5728 `PrivateMessageEvent` \u4e8b\u4ef6\u4e2d, \u4f7f\u7528 `send_msg` \u7ed9bot\u81ea\u5df1\u53d1\u6d88\u606f\u4f1a\u91cd\u5b9a\u5411\u5230 `target_id`(\u5982\u679c\u5b58\u5728\u7684\u8bdd)\n> - \u8bf7\u4f7f\u7528 `send_private_msg` \u7ed9bot\u81ea\u5df1\u53d1\u6d88\u606f\n\n## \u5b89\u88c5\u65b9\u5f0f\n\n### \u4f9d\u8d56\u7ba1\u7406\n\n- `pip install nonebot-plugin-mmm`\n- `poetry add nonebot-plugin-mmm`\n- `pdm add nonebot-plugin-mmm`\n\n> \u5728 `bot.py` \u4e2d\u6dfb\u52a0 `nonebot.load_plugin(\"nonebot_plugin_mmm\")`\n\n### nb-cli\n\n- `nb plugin install nonebot-plugin-mmm`\n\n## \u914d\u7f6e\u9879\n\n### \u975e\u5fc5\u8981\u914d\u7f6e\u9879\n\n- `mmm_block`: \u662f\u5426block `message_sent` \u540e\u7eedmatcher, \u9ed8\u8ba4\u4e3a `True`\n- `mmm_priority`: on `message_sent` \u7684\u4f18\u5148\u7ea7, \u9ed8\u8ba4\u4e3a `0`\n- `mmm_private`: \u662f\u5426\u5904\u7406\u79c1\u804a\u6d88\u606f, \u9ed8\u8ba4\u4e3a `True`\n- `mmm_group`: \u662f\u5426\u5904\u7406\u7fa4\u804a\u6d88\u606f, \u9ed8\u8ba4\u4e3a `True`\n- `mmm_self`: \u662f\u5426\u5904\u7406\u81ea\u5df1\u53d1\u7ed9\u81ea\u5df1\u7684\u6d88\u606f, \u9ed8\u8ba4\u4e3a `False`\n- `mmm_only_text`: \u662f\u5426\u53ea\u5904\u7406\u6587\u672c\u6d88\u606f, \u9ed8\u8ba4\u4e3a `False`\n- `mmm_text_check`: \u662f\u5426\u53ea\u5904\u7406\u7b26\u5408\u6307\u5b9a\u5f00\u5934\u7684\u6d88\u606f, \u9ed8\u8ba4\u4e3a `False`\n- `mmm_use_nb_start` \u662f\u5426\u4f7f\u7528 `nonebot2` \u7684 `COMMAND_START`, \u9ed8\u8ba4\u4e3a `False`\n- `mmm_text_start`: \u68c0\u67e5\u7684\u6d88\u606f\u5f00\u5934, \u9ed8\u8ba4\u4e3a `{\"\",}` \u5373\u4efb\u4f55\u6d88\u606f\u90fd\u901a\u8fc7\n- `mmm_lstrip`: \u662f\u5426\u53bb\u9664\u6d88\u606f\u524d\u7f00, \u9ed8\u8ba4\u4e3a `False`\n- `mmm_lstrip_num`: \u53bb\u9664\u6d88\u606f\u524d\u7f00\u7684\u6570\u91cf, \u9ed8\u8ba4\u4e3a `1`\n\n```toml\nmmm_block = True\nmmm_priority = 0\nmmm_private = True\nmmm_group = True\nmmm_self = False\n\nmmm_only_text = False # \u53ea\u5904\u7406\u6587\u672c\u6d88\u606f\nmmm_text_check = False # \u53ea\u5904\u7406\u7b26\u5408\u6307\u5b9a\u5f00\u5934\u7684\u6d88\u606f\nmmm_use_nb_start = False # \u4f7f\u7528 nonebot2 \u7684 COMMAND_START\nmmm_text_start = [\".\", \"/\"] # \u68c0\u67e5\u7684\u6d88\u606f\u5f00\u5934 \u9ed8\u8ba4\u4e3a [\"\",] \u5373\u4efb\u4f55\u6d88\u606f\u90fd\u901a\u8fc7\nmmm_lstrip = False # \u53bb\u9664\u6d88\u606f\u524d\u7f00\nmmm_lstrip_num = 1 # \u53bb\u9664\u6d88\u606f\u524d\u7f00\u7684\u6570\u91cf\n```\n\n## \u4f9d\u8d56\u9879\n\n```toml\npython = \"^3.9\"\nnonebot2 = \"^2.3.0\"\nnonebot-adapter-onebot = \"^2.1.0\"\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Bot\u7684\u6d88\u606f\u4e5f\u662f\u6d88\u606f!",
"version": "0.2.3",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0e6875eeff4f4f3c1ec5f9bb09d0e73de0c2a152bddf561cb0f167b709a8bc35",
"md5": "12ea8d81bcff2173bbaa0c4032ae0ac4",
"sha256": "ed6ed009a431408464f5185fb6a7a627024255b18f18bb68d4221cc5f1e40f07"
},
"downloads": -1,
"filename": "nonebot_plugin_mmm-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "12ea8d81bcff2173bbaa0c4032ae0ac4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 4898,
"upload_time": "2024-12-16T05:42:38",
"upload_time_iso_8601": "2024-12-16T05:42:38.232425Z",
"url": "https://files.pythonhosted.org/packages/0e/68/75eeff4f4f3c1ec5f9bb09d0e73de0c2a152bddf561cb0f167b709a8bc35/nonebot_plugin_mmm-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "522a0ab0a45a242db6dbc6c91073ee5adcd895db44c7b0f7eb15b8f34b48b097",
"md5": "3a9e49bf51f8d95a1d4b40bdc40027bb",
"sha256": "cf8ff010f3d38c293c709744d44db426fd93fe97b4331b3afcc57bf2c82af2c2"
},
"downloads": -1,
"filename": "nonebot_plugin_mmm-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "3a9e49bf51f8d95a1d4b40bdc40027bb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 4396,
"upload_time": "2024-12-16T05:42:40",
"upload_time_iso_8601": "2024-12-16T05:42:40.298979Z",
"url": "https://files.pythonhosted.org/packages/52/2a/0ab0a45a242db6dbc6c91073ee5adcd895db44c7b0f7eb15b8f34b48b097/nonebot_plugin_mmm-0.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 05:42:40",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nonebot-plugin-mmm"
}