{"id":16610863,"url":"https://github.com/takayama-lily/node-onebot","last_synced_at":"2026-03-09T16:16:12.864Z","repository":{"id":40497524,"uuid":"291393415","full_name":"takayama-lily/node-onebot","owner":"takayama-lily","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-05T14:41:42.000Z","size":250,"stargazers_count":251,"open_issues_count":11,"forks_count":65,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-22T08:48:05.664Z","etag":null,"topics":["chatbot-framework","coolq-http-api","cqhttp","nodejs","oicq","onebot","qqbot","robot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/takayama-lily.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}},"created_at":"2020-08-30T03:32:43.000Z","updated_at":"2025-09-22T15:49:45.000Z","dependencies_parsed_at":"2022-09-20T23:20:35.430Z","dependency_job_id":null,"html_url":"https://github.com/takayama-lily/node-onebot","commit_stats":null,"previous_names":["takayama-lily/onebot"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/takayama-lily/node-onebot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takayama-lily%2Fnode-onebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takayama-lily%2Fnode-onebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takayama-lily%2Fnode-onebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takayama-lily%2Fnode-onebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takayama-lily","download_url":"https://codeload.github.com/takayama-lily/node-onebot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takayama-lily%2Fnode-onebot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30301963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T14:33:48.460Z","status":"ssl_error","status_checked_at":"2026-03-09T14:33:48.027Z","response_time":61,"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":["chatbot-framework","coolq-http-api","cqhttp","nodejs","oicq","onebot","qqbot","robot"],"created_at":"2024-10-12T01:33:10.213Z","updated_at":"2026-03-09T16:16:12.832Z","avatar_url":"https://github.com/takayama-lily.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 为了更好的维护和更新，该项目作为官方http-api与oicq仓库合并，今后请前往[这里](https://github.com/takayama-lily/oicq/tree/master/http-api)查看\n## ↓↓推荐该项目的使用者迁移到更方便管理和维护的模式\n```bash\n\u003e npm i -g oicq@1\n\u003e oicq \u003caccount\u003e\n```\n\n## 该仓库的代码以及衍生fork等仍可以正常使用不受影响\n\n# node-onebot\n\n\u003e 基于 [oicq](https://github.com/takayama-lily/oicq) 的 [onebot(cqhttp)](https://cqhttp.cc) QQ机器人协议的实现  \n\u003e 将机器人部署为独立的服务，通过http或ws与外界通信  \n\u003e 已支持手机QQ扫码直接登录(提示输入密码时直接按回车)  \n\u003e master分支是独立运行版，另提供[插件版](https://github.com/takayama-lily/node-onebot/tree/v2)\n\n[![core](https://img.shields.io/badge/core-oicq-brightgreen)](https://www.npmjs.com/package/oicq)\n[![node engine](https://img.shields.io/node/v/oicq.svg)](https://nodejs.org)\n[![discord](https://img.shields.io/static/v1?label=chat\u0026message=discord\u0026color=7289da\u0026logo=discord)](https://discord.gg/gKnU7BARzv)\n\n**使用方法：**\n\n1. 下载安装 [nodejs](https://nodejs.org) 安装版 (版本必须高于v12.16)\n2. 下载此源码包 (建议用`git clone`)  \n3. 重命名 `config.sample.js` 为 `config.js` 并配置\n4. 运行 `node main 123456789` (数字是登陆账号)\n\n* 今后启动只需最后一步\n* 只有首次登陆时需要交互(密码、验证码、设备锁)，之后推荐使用pm2或forever等部署工具。\n\n\u003e config.js 支持更多的配置，可参考 [ConfBot](https://github.com/takayama-lily/oicq/blob/4e24fa15728fcf7e305b08425227b6cbb094550b/client.d.ts#L12)  \n\u003e [如何获得滑动验证码的ticket](https://github.com/takayama-lily/oicq/wiki/01.%E6%BB%91%E5%8A%A8%E9%AA%8C%E8%AF%81%E7%A0%81%E5%92%8C%E8%AE%BE%E5%A4%87%E9%94%81)  \n\u003e [其他常见问题](https://github.com/takayama-lily/oicq/wiki/02.%E5%85%B6%E4%BB%96%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)  \n\u003e 当前master分支下只进行http/ws的bug修复，及时更新依赖即可获得新特性。\n\n----\n\n## 通信\n\n* [x] HTTP和正向WS服务器\n* [x] POST上报(多点)\n* [x] 反向WS连接(多点)\n\n----\n\n## API ([参考文档](https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md))\n\n\u003cdetails\u003e\n\n\u003csummary\u003e已实现(文档中已列出)\u003c/summary\u003e\n\n|名称|备注|\n|-|-|\n|get_friend_list        |\n|get_group_list         |\n|get_group_info         |\n|get_group_member_list  |\n|get_group_member_info  |\n|get_stranger_info      |\n|**send_private_msg**   |message_id是string\n|**send_group_msg**     |message_id是string\n|send_msg               |\n|delete_msg             |\n|get_msg                |\n|set_friend_add_request |\n|set_group_add_request  |\n|set_group_special_title|\n|set_group_admin        |\n|set_group_card         |\n|set_group_kick         |\n|set_group_ban          |\n|set_group_leave        |\n|set_group_name         |\n|set_group_whole_ban    |\n|set_group_anonymous_ban|仅支持flag字段，不支持另外两种\n|set_group_anonymous    |\n|send_like              |\n|get_login_info         |\n|can_send_image         |\n|can_send_record        |\n|get_status             |\n|get_version_info       |\n|.handle_quick_operation|仅WS有效\n|get_cookies            |\n|get_csrf_token         |\n|clean_cache            |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003e已实现(新增)\u003c/summary\u003e\n\n|名称|参数|备注|\n|-|-|-|\n|get_stranger_list      ||获取陌生人列表\n|send_discuss_msg       |discuss_id\u003cbr\u003emessage\u003cbr\u003eauto_escape|发讨论组消息，没有message_id\n|send_group_notice      |content|发送群公告\n|send_group_poke        |group_id\u003cbr\u003euser_id|群戳一戳，未来可能会用CQ码实现\n|set_online_status      |status|设置在线状态(※仅限手机协议支持)\u003cbr\u003e11我在线上 31离开 41隐身 50忙碌 60Q我吧 70请勿打扰|\n|add_friend             |group_id\u003cbr\u003euser_id\u003cbr\u003ecomment|添加群员为好友\n|delete_friend          |user_id\u003cbr\u003eblock|删除好友\u003cbr\u003eblock默认为true\n|invite_friend          |group_id\u003cbr\u003euser_id|邀请好友入群\n|set_nickname           |nickname|设置昵称\n|set_gender             |gender|设置性别 0未知 1男 2女\n|set_birthday           |birthday|设置生日 格式：20110202\n|set_description        |description|设置个人说明\n|set_signature          |signature|设置签名\n|set_portrait           |file|设置个人头像，与CQ码中的file格式相同\n|set_group_portrait     |file|设置群头像\n|get_system_msg         ||获得未处理的申请\n|get_chat_history       |message_id\u003cbr\u003ecount|返回message_id往前的count条消息\u003cbr\u003ecount默认20\n|get_forward_msg        |resid|\n|send_temp_msg          |group_id\u003cbr\u003euser_id\u003cbr\u003emessage\u003cbr\u003eauto_escape|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003e尚未实现\u003c/summary\u003e\n\n|名称|\n|-|\n|get_group_honor_info|\n|get_credentials|\n|get_vip_info|\n|get_record|\n|get_image|\n|set_restart|\n\n\u003c/details\u003e\n\n----\n\n## Events\n\n\u003cdetails\u003e\n\n\u003csummary\u003e点开\u003c/summary\u003e\n\n新版事件的notice部分的上报格式默认与cqhttp中的格式不同。  \n如需使用cqhttp格式，在config.js中将`use_cqhttp_notice`设置为`true`。\n\n||新版格式([文档](https://github.com/takayama-lily/oicq/wiki/92.%E4%BA%8B%E4%BB%B6%E6%96%87%E6%A1%A3))|cqhttp格式([文档](https://github.com/howmanybots/onebot/blob/master/v11/specs/event/README.md))|\n|-|-|-|\n|好友请求|request.friend.add     |request.friend         |\n|加群请求|request.group.add      |request.group.add      |\n|加群邀请|request.group.invite   |request.group.invite   |\n|好友消息|message.private.friend |message.private.friend |\n|单向好友|message.private.single |                       |\n|临时会话|message.private.group  |message.private.group  |\n|临时会话|message.private.other  |message.private.other  |\n|群聊消息|message.group.normal   |message.group.normal   |\n|匿名消息|message.group.anonymous|message.group.anonymous|\n|讨论组消|message.discuss        |                       |\n|好友增加|notice.friend.increase |notice.friend_add      |\n|好友减少|notice.friend.decrease |                       |\n|好友撤回|notice.friend.recall   |notice.friend_recall   |\n|资料变更|notice.friend.profile  |                       |\n|群员增加|notice.group.increase  |notice.group_increase  |\n|群员减少|notice.group.decrease  |notice.group_decrease  |\n|群组撤回|notice.group.recall    |notice.group_recall    |\n|管理变更|notice.group.admin     |notice.group_admin     |\n|群组禁言|notice.group.ban       |notice.group_ban       |\n|群组转让|notice.group.transfer  |                       |\n|群组文件|表现为CQ码              |notice.group_upload    |\n|群戳一戳|notice.group.poke      |                       |\n|群设置变|notice.group.setting   |                       |\n|元事件|meta_event.lifecycle.enable|meta_event.lifecycle.enable|\n|元事件|meta_event.lifecycle.disable|meta_event.lifecycle.disable|\n|元事件|meta_event.lifecycle.connect|meta_event.lifecycle.connect|\n|元事件|meta_event.heartbeat|meta_event.heartbeat|\n\n\u003c/details\u003e\n\n----\n\n[支持的CQ码](https://github.com/takayama-lily/oicq/wiki/90.%E5%A6%82%E4%BD%95%E5%8F%91%E9%80%81%E5%A4%9A%E5%AA%92%E4%BD%93%E5%86%85%E5%AE%B9(CQ%E7%A0%81))\n\n----\n\n## 其他\n\n* [x] 字符串或数组消息段\n* [x] 鉴权\n* [x] WS心跳\n* [x] _async异步调用api\n* [x] _rate_limited限速调用api\n* [x] [事件过滤器](https://richardchien.gitee.io/coolq-http-api/docs/4.15/#/EventFilter)\n* [x] 设置允许跨域请求\n* [x] 自动更新内核版本\n\n## 考古\n\n[旧版cqhttp文档](https://richardchien.gitee.io/coolq-http-api/docs/4.15/#/Configuration)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakayama-lily%2Fnode-onebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakayama-lily%2Fnode-onebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakayama-lily%2Fnode-onebot/lists"}