<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 Adapter Tailchat
## Tailchat 适配器
[![License](https://img.shields.io/github/license/eya46/nonebot-adapter-tailchat)](https://github.com/eya46/nonebot-adapter-tailchat/blob/master/LICENSE)
[![Python](https://img.shields.io/badge/python-3.9+-blue.svg)](https://docs.python.org/zh-cn/3.9/library/index.html)
[![NoneBot](https://img.shields.io/badge/nonebot-2.3.0+-red.svg)](https://nonebot.dev)
[![Tailchat](https://img.shields.io/badge/Tailchat-1.11.3+-blue.svg)](https://tailchat.msgbyte.com)
</div>
## 环境要求
- Tailchat >= 1.11.3
- api: `getMessage`
- Python 3.9+
- NoneBot 2.3.0+
- pydantic >= 2.0.0
- HTTPClient驱动器
- > 默认需要,除非 `useHttp=False`, 且配置了 `jwt`
- ~httpx
- ~aiohttp
## Tailchat机器人开启方式
1. 安装 `开放平台插件`
2. 进入 `设置` -> `开放平台` -> `创建应用` -> `填写基本信息`
3. 进入 `应用` -> `机器人` -> `开启机器人能力`
4. 在 `基本信息` 内获取 `appId` 和 `appSecret`
> 暂未支持 `消息回调地址`
## 配置方式
`.env` 文件
```dotenv
TAILCHAT_BOTS='
[
{
"url": "https://xxxxxxx/",
"appId": "ts_******",
"appSecret": "****"
}
]
'
TAILCHAT_RECONNECT_INTERVAL=5
TAILCHAT_TIME_OUT=5
```
## 详细配置项
[config.py](./nonebot_adapter_tailchat/config.py)
## 相关项目
- [dcwatson/bbcode](https://github.com/dcwatson/bbcode)
- [Tailchat](https://github.com/msgbyte/tailchat)
- [python-socketio](https://github.com/miguelgrinberg/python-socketio)
- [nonebot2](https://github.com/nonebot/nonebot2)
- [pydantic2](https://docs.pydantic.dev/latest/)
- ...
Raw data
{
"_id": null,
"home_page": "https://github.com/eya46/nonebot-adapter-tailchat",
"name": "nonebot-adapter-tailchat",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "bot, tailchat, nonebot2",
"author": "eya46",
"author_email": "61458340+eya46@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/ee/e8/a08381847fd7f554f8dce8f8f168854eb36eb3be2a5c7c814325194417c0/nonebot_adapter_tailchat-0.1.0b13.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 Adapter Tailchat\n\n## Tailchat \u9002\u914d\u5668\n\n[![License](https://img.shields.io/github/license/eya46/nonebot-adapter-tailchat)](https://github.com/eya46/nonebot-adapter-tailchat/blob/master/LICENSE)\n[![Python](https://img.shields.io/badge/python-3.9+-blue.svg)](https://docs.python.org/zh-cn/3.9/library/index.html)\n[![NoneBot](https://img.shields.io/badge/nonebot-2.3.0+-red.svg)](https://nonebot.dev)\n[![Tailchat](https://img.shields.io/badge/Tailchat-1.11.3+-blue.svg)](https://tailchat.msgbyte.com)\n</div>\n\n## \u73af\u5883\u8981\u6c42\n\n- Tailchat >= 1.11.3\n - api: `getMessage`\n- Python 3.9+\n- NoneBot 2.3.0+\n- pydantic >= 2.0.0\n- HTTPClient\u9a71\u52a8\u5668\n - > \u9ed8\u8ba4\u9700\u8981,\u9664\u975e `useHttp=False`, \u4e14\u914d\u7f6e\u4e86 `jwt`\n - ~httpx\n - ~aiohttp\n\n## Tailchat\u673a\u5668\u4eba\u5f00\u542f\u65b9\u5f0f\n\n1. \u5b89\u88c5 `\u5f00\u653e\u5e73\u53f0\u63d2\u4ef6`\n2. \u8fdb\u5165 `\u8bbe\u7f6e` -> `\u5f00\u653e\u5e73\u53f0` -> `\u521b\u5efa\u5e94\u7528` -> `\u586b\u5199\u57fa\u672c\u4fe1\u606f`\n3. \u8fdb\u5165 `\u5e94\u7528` -> `\u673a\u5668\u4eba` -> `\u5f00\u542f\u673a\u5668\u4eba\u80fd\u529b`\n4. \u5728 `\u57fa\u672c\u4fe1\u606f` \u5185\u83b7\u53d6 `appId` \u548c `appSecret`\n\n> \u6682\u672a\u652f\u6301 `\u6d88\u606f\u56de\u8c03\u5730\u5740`\n\n## \u914d\u7f6e\u65b9\u5f0f\n\n`.env` \u6587\u4ef6\n\n```dotenv\nTAILCHAT_BOTS='\n[\n {\n \"url\": \"https://xxxxxxx/\",\n \"appId\": \"ts_******\",\n \"appSecret\": \"****\"\n }\n]\n'\n\nTAILCHAT_RECONNECT_INTERVAL=5\nTAILCHAT_TIME_OUT=5\n```\n\n## \u8be6\u7ec6\u914d\u7f6e\u9879\n\n[config.py](./nonebot_adapter_tailchat/config.py)\n\n## \u76f8\u5173\u9879\u76ee\n\n- [dcwatson/bbcode](https://github.com/dcwatson/bbcode)\n- [Tailchat](https://github.com/msgbyte/tailchat)\n- [python-socketio](https://github.com/miguelgrinberg/python-socketio)\n- [nonebot2](https://github.com/nonebot/nonebot2)\n- [pydantic2](https://docs.pydantic.dev/latest/)\n- ...",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "NoneBot2 Tailchat \u9002\u914d\u5668 / Tailchat adapter for nonebot2",
"version": "0.1.0b13",
"project_urls": {
"Homepage": "https://github.com/eya46/nonebot-adapter-tailchat",
"Repository": "https://github.com/eya46/nonebot-adapter-tailchat",
"Tailchat": "https://tailchat.msgbyte.com/"
},
"split_keywords": [
"bot",
" tailchat",
" nonebot2"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9e663c8afaf67a3144a65ea921676f2e50a447efc1ea0490ee5af4af9345df89",
"md5": "757b7015b75d1ddb656390a0377f69d1",
"sha256": "f4877a4b47b908e3bd1a3f4fd665cba30711dc8ff30101e2922a61e0b82f9e86"
},
"downloads": -1,
"filename": "nonebot_adapter_tailchat-0.1.0b13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "757b7015b75d1ddb656390a0377f69d1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 32318,
"upload_time": "2024-10-29T09:01:59",
"upload_time_iso_8601": "2024-10-29T09:01:59.287327Z",
"url": "https://files.pythonhosted.org/packages/9e/66/3c8afaf67a3144a65ea921676f2e50a447efc1ea0490ee5af4af9345df89/nonebot_adapter_tailchat-0.1.0b13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "eee8a08381847fd7f554f8dce8f8f168854eb36eb3be2a5c7c814325194417c0",
"md5": "1141008a94076b20a98eb0f56118641b",
"sha256": "4fa20baa27ce6740772e20c3074012cfedb8cdfa92616f9277f91c6413a4079c"
},
"downloads": -1,
"filename": "nonebot_adapter_tailchat-0.1.0b13.tar.gz",
"has_sig": false,
"md5_digest": "1141008a94076b20a98eb0f56118641b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 28817,
"upload_time": "2024-10-29T09:02:00",
"upload_time_iso_8601": "2024-10-29T09:02:00.983897Z",
"url": "https://files.pythonhosted.org/packages/ee/e8/a08381847fd7f554f8dce8f8f168854eb36eb3be2a5c7c814325194417c0/nonebot_adapter_tailchat-0.1.0b13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-29 09:02:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eya46",
"github_project": "nonebot-adapter-tailchat",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-adapter-tailchat"
}