{"id":37102867,"url":"https://github.com/nsxdevx/nsxbot","last_synced_at":"2026-01-14T12:27:58.641Z","repository":{"id":286572375,"uuid":"961513505","full_name":"nsxdevx/nsxbot","owner":"nsxdevx","description":"NsxBot 是一个使用 Go (Golang)  语言编写，基于 OneBot11 协议的聊天机器人框架。","archived":false,"fork":false,"pushed_at":"2025-10-20T08:19:24.000Z","size":2336,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T10:25:08.238Z","etag":null,"topics":["go","golang","onebot","onebot-sdk","onebot11"],"latest_commit_sha":null,"homepage":"https://nsxdevx.github.io/website/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nsxdevx.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-04-06T17:14:36.000Z","updated_at":"2025-10-20T08:19:28.000Z","dependencies_parsed_at":"2025-04-07T09:22:55.907Z","dependency_job_id":"6dd59b1c-3c36-4422-8817-a547b4dc2f9f","html_url":"https://github.com/nsxdevx/nsxbot","commit_stats":null,"previous_names":["atopos31/nsxbot","nsxdevx/nsxbot"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/nsxdevx/nsxbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsxdevx%2Fnsxbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsxdevx%2Fnsxbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsxdevx%2Fnsxbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsxdevx%2Fnsxbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsxdevx","download_url":"https://codeload.github.com/nsxdevx/nsxbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsxdevx%2Fnsxbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["go","golang","onebot","onebot-sdk","onebot11"],"created_at":"2026-01-14T12:27:58.091Z","updated_at":"2026-01-14T12:27:58.620Z","avatar_url":"https://github.com/nsxdevx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# NsxBot OneBot Framework\n\n![nsxbot](https://socialify.git.ci/atopos31/nsxbot/image?font=Inter\u0026language=1\u0026logo=https%3A%2F%2Fonebot.dev%2Flogo.png\u0026name=1\u0026owner=1\u0026pattern=Circuit+Board\u0026stargazers=1\u0026theme=Auto)\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/nsxdevx/nsxbot.svg)](https://pkg.go.dev/github.com/nsxdevx/nsxbot)\n[![Badge](https://img.shields.io/badge/OneBot-11-black)](https://github.com/botuniverse/onebot-11)\n[![License](https://img.shields.io/badge/License-unlicense-green)](https://github.com/nsxdevx/nsxbot/blob/master/LICENSE)\n[![qq group](https://img.shields.io/badge/Group-881412730-red?style=flat-square\u0026logo=tencent-qq)](https://qm.qq.com/cgi-bin/qm/qr?k=d5DcTIKBYVmaHZHZ4BqwKaXop4ePjrh_\u0026jump_from=webapi\u0026authKey=nY7Yhr6GhgbS28XBw0nrH4M3tutmPF9U1+5m7GCaRgaABTqBHkTcHC1l1Sa1NFrh)\n\n\u003c/div\u003e\n\n\u003e **⚠️ 注意：** 本项目目前处于 v0.x.y 阶段，API 尚不稳定，随时可能发生变更。请勿大规模使用，或锁定到具体的 commit/tag。\n\n## 简介\n\nNsxBot 是一个使用 [Go](https://go.dev/) 语言编写，基于 [OneBot 11](https://github.com/botuniverse/onebot-11) 协议的聊天机器人框架。\n\n提供类似Web框架风格的API，如果你是一个Go Web开发者，那么你可以非常方便的使用NsxBot。\n\n## 特性\n- http，websocket 协议支持\n- 支持多客户端统一处理\n- 泛型支持，远离any\n- 中间件支持\n- 过滤器支持\n- 事件分组监听\n- 自由组合与可扩展性\n\n## 快速开始\n\n### 获取\n\n```sh\ngo get -u github.com/nsxdevx/nsxbot\n```\n\n### 运行\n示例：\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/nsxdevx/nsxbot\"\n\t\"github.com/nsxdevx/nsxbot/driver\"\n\t\"github.com/nsxdevx/nsxbot/event\"\n\t\"github.com/nsxdevx/nsxbot/schema\"\n)\n\nfunc main() {\n\tdriver := driver.NewDriverHttp(\":8080\", \"http://localhost:4000\")\n\n\tbot := nsxbot.Default(driver)\n\n\tpvt := nsxbot.OnEvent[event.PrivateMessage](bot)\n\n\tadminuin, _ := strconv.ParseInt(os.Getenv(\"ADMIN_UIN\"), 10, 64)\n\tpvt.Handle(func(ctx *nsxbot.Context[event.PrivateMessage]) {\n\t\tmsg := ctx.Msg\n\t\ttext, err := msg.TextFirst()\n\t\tif err != nil {\n\t\t\tctx.Log.Error(\"Error parsing message\", \"error\", err)\n\t\t\treturn\n\t\t}\n\t\tctx.Log.Info(\"Private Message\", \"message\", text.Text)\n\t\tmsg.Reply(ctx, text.Text)\n\t\tvar msgchain schema.MessageChain\n\t\tctx.SendPvtMsg(ctx, adminuin, msgchain.Text(\"收到回复了吗？\").Br().Face(\"4\"))\n\t})\n\n\tctx, cancel := context.WithCancel(context.Background())\n\tdefer cancel()\n\t// Run\n\tbot.Run(ctx)\n}\n```\n## 参考\n- [OneBot 11](https://github.com/botuniverse/onebot-11)\n- [OneBot 大典](https://github.com/tanebijs/onebot-pedia)\n- [NapCat 接口文档](https://napcat.apifox.cn/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsxdevx%2Fnsxbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsxdevx%2Fnsxbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsxdevx%2Fnsxbot/lists"}