{"id":28899244,"url":"https://github.com/nonebot/adapter-milky","last_synced_at":"2026-02-14T03:56:03.901Z","repository":{"id":294015677,"uuid":"984774863","full_name":"nonebot/adapter-milky","owner":"nonebot","description":"NoneBot2 Milky 协议适配器 / Milky Protocol adapter for nonebot2","archived":false,"fork":false,"pushed_at":"2025-06-12T14:51:32.000Z","size":148,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T19:16:20.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/nonebot.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},"funding":{"open_collective":"nonebot","custom":["https://afdian.com/@nonebot"]}},"created_at":"2025-05-16T13:39:47.000Z","updated_at":"2025-06-12T14:50:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7dec4d8-ff13-4c08-a556-9fd3e96597b3","html_url":"https://github.com/nonebot/adapter-milky","commit_stats":null,"previous_names":["nonebot/adapter-milky"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nonebot/adapter-milky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-milky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-milky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-milky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-milky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonebot","download_url":"https://codeload.github.com/nonebot/adapter-milky/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-milky/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260775414,"owners_count":23061053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-06-21T08:08:47.317Z","updated_at":"2026-02-14T03:56:03.872Z","avatar_url":"https://github.com/nonebot.png","language":"Python","funding_links":["https://opencollective.com/nonebot","https://afdian.com/@nonebot"],"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\n\n# NoneBot-Adapter-Milky\n\n_✨ NoneBot2 Milky 协议适配 / Milky Protocol Adapter for NoneBot2 ✨_\n\n\u003c/div\u003e\n\n## 协议介绍\n\n[Milky 协议](https://milky.ntqqrev.org/)\n\n### 协议端\n\n- [Lagrange.Milky (WIP)](https://github.com/LagrangeDev/LagrangeV2/tree/main/Lagrange.Milky)\n- [Yogurt](https://github.com/LagrangeDev/acidify/tree/main/yogurt)\n- [LuckyLilliaBot](https://github.com/LLOneBot/LuckyLilliaBot)\n\n## 配置\n\n修改 NoneBot 配置文件 `.env` 或者 `.env.*`。\n\n### Driver\n\n参考 [driver](https://nonebot.dev/docs/appendices/config#driver) 配置项，添加 `HTTPClient` 和 `WebSocketClient` 支持。\n\n如：\n\n```dotenv\nDRIVER=~httpx+~websockets\n```\n\n或\n\n```dotenv\nDRIVER=~aiohttp\n```\n\n如果你使用的是 Webhook 模式，则可以移除 `WebSocketClient` 支持，并添加 `ASGI` 支持。\n\n如：\n\n```dotenv\nDRIVER=~httpx+~fastapi\n```\n\n或\n\n```dotenv\nDRIVER=~aiohttp+~fastapi\n```\n\n### MILKY_CLIENTS\n\n配置连接配置，如：\n\n```dotenv\nMILKY_CLIENTS='\n[\n  {\n    \"host\": \"localhost\",\n    \"port\": \"8080\",\n    \"access_token\": \"xxx\",\n    \"secure\": false\n  }\n]\n'\n```\n\n`host` 与 `port` 为 Milky 协议端设置的监听地址与端口，\n\n`access_token` 为可选项，具体情况以 Milky 协议端为准。\n\n`secure` 为可选项，表示是否使用安全连接（即 wss:// 或 https://），默认为 `false`。\n\n### MILKY_WEBHOOK\n\n如果你使用的是 Webhook 模式，则需要配置 `MILKY_WEBHOOK`。\n\n```dotenv\nMILKY_WEBHOOK='\n{\n  \"host\": \"localhost\",\n  \"port\": \"8081\",\n  \"access_token\": \"xxx\",\n  \"secure\": false\n}\n'\n```\n\n`host` 与 `port` 为 Milky 协议端设置的监听地址与端口，\n\n`access_token` 为可选项，具体情况以 Milky 协议端为准。\n\n`secure` 为可选项，表示是否使用安全连接（即 wss:// 或 https://），默认为 `false`。\n\n## 示例\n\n```python\nfrom nonebot import on_command\nfrom nonebot.adapters.milky import Bot\nfrom nonebot.adapters.milky.event import MessageEvent\nfrom nonebot.adapters.milky.message import MessageSegment\n\n\nmatcher = on_command(\"test\")\n\n@matcher.handle()\nasync def handle_receive(bot: Bot, event: MessageEvent):\n    if event.is_private:\n        await bot.send(event, MessageSegment.text(\"Hello, world!\"))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fadapter-milky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonebot%2Fadapter-milky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fadapter-milky/lists"}