{"id":35211112,"url":"https://github.com/molanp/nonebot-adapter-yunhu","last_synced_at":"2026-01-24T15:08:21.807Z","repository":{"id":321433593,"uuid":"1085758986","full_name":"molanp/nonebot-adapter-yunhu","owner":"molanp","description":"云湖的NoneBot适配器","archived":false,"fork":false,"pushed_at":"2026-01-18T17:00:20.000Z","size":720,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T18:59:31.942Z","etag":null,"topics":["nonebot-adapter","nonebot2","yunhu","yunhu-robot"],"latest_commit_sha":null,"homepage":"http://yunhu.awkchan.top/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/molanp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-29T13:28:18.000Z","updated_at":"2026-01-18T17:00:24.000Z","dependencies_parsed_at":"2025-10-29T17:34:30.878Z","dependency_job_id":"3c1bb29d-bf47-4d82-b848-a4d815dfe5c3","html_url":"https://github.com/molanp/nonebot-adapter-yunhu","commit_stats":null,"previous_names":["molanp/nonebot-adapter-yunhu"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/molanp/nonebot-adapter-yunhu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molanp%2Fnonebot-adapter-yunhu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molanp%2Fnonebot-adapter-yunhu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molanp%2Fnonebot-adapter-yunhu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molanp%2Fnonebot-adapter-yunhu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/molanp","download_url":"https://codeload.github.com/molanp/nonebot-adapter-yunhu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molanp%2Fnonebot-adapter-yunhu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nonebot-adapter","nonebot2","yunhu","yunhu-robot"],"created_at":"2025-12-29T18:24:50.513Z","updated_at":"2026-01-24T15:08:21.793Z","avatar_url":"https://github.com/molanp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nonebot.dev/\"\u003e\u003cimg src=\"https://nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\nNoneBot-Adapter-YunHu\n\n_✨ YunHu adapter for NoneBot2 ✨_\n\n[![PyPI](https://img.shields.io/pypi/v/nonebot-adapter-yunhu)](https://pypi.org/project/nonebot-adapter-yunhu/)\n![GitHub](https://img.shields.io/github/license/molanp/nonebot-adapter-yunhu)\n\n\u003c/div\u003e\n\n## 支持情况\n\n### 事件支持情况\n\n- [x] 基础消息事件\n- [x] 按钮事件上报接收\n- [ ] 机器人设置事件\n- [x] 按钮发送\n- [x] 表单接收\n\n### 支持的消息元素\n\n| 元素              | 支持情况 |\n| ----------------- | -------- |\n| 文本 Text         | ✅       |\n| 图片 Image        | ✅       |\n| 提及用户 At(user) | ✅       |\n| 按钮 Buttons      | ✅       |\n| 表单 Form         | ⬇️       |\n| 表情包 expression | ⬇️       |\n| 语音 Audio        | ⬇️       |\n| 视频 Video        | ✅       |\n| 文件 File         | ✅       |\n| HTML HTML         | ✅       |\n| 文章 Post         | ⬇️       |\n| Markdown          | ✅       |\n| 提示信息 Tip      | ⬇️       |\n| 回复 Reply        | ✅       |\n\n### 支持的消息操作\n\n| 操作              | 支持情况 |\n| ----------------- | -------- |\n| 发送 Send         | ✅       |\n| 撤回 Recall       | ✅       |\n| 编辑 Edit         | ✅       |\n| 表情响应 Reaction | 🚫       |\n\n## 简介\n\n`nonebot-adapter-yunhu` 是为 [NoneBot2](https://github.com/nonebot/nonebot2) 设计的云湖(YunHu)平台适配器，支持开发云湖机器人，提供完整的消息和服务支持。\n\n## 安装\n\n### 使用 pip 安装\n\n```bash\npip install nonebot-adapter-yunhu\n```\n\n### 使用 nb-cli 安装\n\n```bash\nnb adapter install nonebot-adapter-yunhu\n```\n\n### 使用 poetry 安装\n\n```bash\npoetry add nonebot-adapter-yunhu\n```\n\n## 配置\n\n在您的 NoneBot 项目配置文件 `.env` 中添加以下配置：\n\n\u003e `app_id` 是 Bot 的 ID，可在 bot 信息页面查看\n\n```env\nDRIVER=~fastapi+~httpx\n\nYUNHU_BOTS = '[{\n    \"app_id\": \"123456\",\n    \"token\": \"xxx\",\n}\n]\n'\n\nHOST = 0.0.0.0\nPORT = 8080\n```\n\n在 `bot.py` 中注册适配器：\n\n```python\nimport nonebot\nfrom nonebot.adapters.yunhu import Adapter as YunhuAdapter\n\nnonebot.init()\n\ndriver = nonebot.get_driver()\ndriver.register_adapter(YunhuAdapter)\n```\n\n\u003e 在云湖控制台，上报地址为 `http(s)://{HOST}:{PORT}/yunhu/{app_id}`\n\n## 使用方法\n\n\u003e [!tip]\n\u003e \n\u003e 建议使用 `nonebot-plugin-alconna` 和 `nonebot-plugin-uninfo` 等插件，来提高插件可移植性，避免直接与适配器底层交互\n\n### 基本用法\n\n```python\nfrom nonebot import on_command\nfrom nonebot.adapters.yunhu import Bot, Event\n\necho = on_command(\"echo\")\n\n@echo.handle()\nasync def handle_echo(bot: Bot, event: Event):\n    await echo.finish(event.get_message())\n```\n\n### 发送不同类型的消息\n\n具体类型参考 `message.py`\n\n```python\nfrom nonebot import on_command\nfrom nonebot.adapters.yunhu import Bot, Event, MessageSegment\n\ntest = on_command(\"test\")\n\n@test.handle()\nasync def handle_send_image(bot: Bot, event: Event):\n    # 发送文本\n    await test.send(MessageSegment.text(\"Hello World\"))\n    # 发送图片, 也可以直接传参 raw=bytes 或 raw=\"imageKey\"\n    await test.send(MessageSegment.image(url=\"xxxxx\"))\n    # @某人\n    await test.send(MessageSegment.at(\"user_id\"))\n```\n\n## 获取帮助\n\n\u003cimg alt=\"image\" width=\"300\" src=\"https://github.com/user-attachments/assets/b133281f-58d2-4974-bee3-77b520b0864f\" /\u003e\n\n- 加入云湖群聊【NoneBot 云湖适配器交流群】: [链接](https://yhfx.jwznb.com/share?key=85HNqkjNINWc\u0026ts=1762393601)\n- 群 ID: 519215204\n\n## 相关链接\n\n- [适配器帮助文档](https://yunhu.awkchan.top/)\n- [云湖第三方文档 1](https://yh-api.yyyyt.top/api/v1/msg.html#%E6%89%B9%E9%87%8F%E6%92%A4%E5%9B%9E%E6%B6%88%E6%81%AF)\n- [云湖第三方文档 2](https://fly1919.github.io/adapter-yunhupro/markdown/dev/yunhu-official/400/7.html)\n- [云湖第三方文档 3](https://www.yhchat.top/#/yunhu-bot-dev/msg-type-examples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolanp%2Fnonebot-adapter-yunhu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmolanp%2Fnonebot-adapter-yunhu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolanp%2Fnonebot-adapter-yunhu/lists"}