{"id":19546500,"url":"https://github.com/steve-xmh/neonbot","last_synced_at":"2025-04-26T19:32:42.696Z","repository":{"id":47546695,"uuid":"372250236","full_name":"Steve-xmh/neonbot","owner":"Steve-xmh","description":"An new qqbot framework using node-oicq with more stability!（注：缓慢更新，请谅解）","archived":true,"fork":false,"pushed_at":"2022-12-17T09:26:32.000Z","size":554,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-14T13:15:02.606Z","etag":null,"topics":["bot","nodejs","oicq","qqbot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Steve-xmh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-05-30T15:29:28.000Z","updated_at":"2024-07-02T09:50:14.000Z","dependencies_parsed_at":"2023-01-29T17:01:21.250Z","dependency_job_id":null,"html_url":"https://github.com/Steve-xmh/neonbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Steve-xmh%2Fneonbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Steve-xmh%2Fneonbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Steve-xmh%2Fneonbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Steve-xmh%2Fneonbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Steve-xmh","download_url":"https://codeload.github.com/Steve-xmh/neonbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251041643,"owners_count":21527230,"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":["bot","nodejs","oicq","qqbot"],"created_at":"2024-11-11T03:45:41.112Z","updated_at":"2025-04-26T19:32:37.688Z","avatar_url":"https://github.com/Steve-xmh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NeonBot\n一个基于 abot 概念，使用 Worker Thread 分离机器人和插件运行环境的机器人运行框架！\n\n## 理念\n本框架参考了 [takayama-lily/abot](https://github.com/takayama-lily/abot) 框架，并借此增强了以下功能：\n\n- 所有的插件，机器人均有自己的单独线程运行，互不干扰，重启方便，避免了一些使用了诸如 `http` 库的插件出错导致整个框架崩溃的问题\n- 以不污染库本身为前提，提供更将灵活的配置方式和插件配置方式\n- 速度不慢，内存也很友好，后面也会通过其他方式提高插件与机器人的交互性能\n- 插件/配置/数据独立化，不会干扰或污染 NeonBot 本身，方便部分喜欢一直跟进更新的用户使用 `git pull` 直接更新版本\n\n## 安装\n作者开发时使用的软件包管理器是 `yarn`，当然你也可以使用 `npm`。\n\n克隆本仓库，切换至 `dev` 分支（如果你想体验最新开发版本的话），然后使用以下指令构建源代码并开始运行：\n\n```shell\nyarn\nyarn dist\nyarn start [配置文件路径]\n```\n\n而后需要更新则只需要：\n```shell\nyarn up # 使用 git pull 拉取仓库新源代码，然后构建\n```\n\n## 配置文件\n配置文件可以参考 `src/index.ts` 中对配置文件的类型定义进行设置，将会使用 `require` 函数来加载配置文件，故可以为 `json` 文件或 `js` 脚本  \n作者个人喜好用 `neonbot.config.js` 或 `neonbot.config.json` 作为配置文件的名称。\n\n## 从 abot 迁移\n迁移插件其实非常简单，目前只需要：\n\n- 在导出中加个 `id` 和 `shortName` 字段用于记录输出/插件标识\n- **去掉你的所有同步访问 `Bot` 字段和函数，全部改用异步调用（非常重要，因为多线程操作是注定异步的），详情可以查阅 `src/botproxy.ts` 中的 `BotProxy` 类**\n- 将导出中的 `activate` 改名为 `enable`\n- 将导出中的 `deactivate` 改名为 `disable`\n\n更多可选导出请参考 `src/plugin.ts` 中的 `NeonPlugin` 接口\n\n## 路线图\n当前代码开发仍然以自用需求为先，会先完成自己需要的功能，然后逐步给大家完善其他功能。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteve-xmh%2Fneonbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteve-xmh%2Fneonbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteve-xmh%2Fneonbot/lists"}