{"id":19854912,"url":"https://github.com/floattech/voidbot","last_synced_at":"2025-07-03T02:34:24.976Z","repository":{"id":48087592,"uuid":"376782150","full_name":"FloatTech/voidbot","owner":"FloatTech","description":"支持 OneBot 标准的 能跑就行 Python SDK","archived":false,"fork":false,"pushed_at":"2021-12-04T02:14:43.000Z","size":33,"stargazers_count":21,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-02T01:37:49.814Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FloatTech.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":"2021-06-14T10:17:42.000Z","updated_at":"2025-03-11T04:03:38.000Z","dependencies_parsed_at":"2022-08-12T18:20:31.491Z","dependency_job_id":null,"html_url":"https://github.com/FloatTech/voidbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/FloatTech/voidbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2Fvoidbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2Fvoidbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2Fvoidbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2Fvoidbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FloatTech","download_url":"https://codeload.github.com/FloatTech/voidbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2Fvoidbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263247757,"owners_count":23436904,"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":"2024-11-12T14:11:03.376Z","updated_at":"2025-07-03T02:34:24.917Z","avatar_url":"https://github.com/FloatTech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VoidBot\n支持 OneBot 标准的 能跑就行 Python SDK \n\n- 极致轻量：一个文件，200 行代码实现了 80％ 常用开发功能\n- 部署简单：Python环境上，只需再安装一个 `websocket-client` 库\n- 代码简单：只需要 Python 入门即可读懂源码，参考[菜鸟教程](https://www.runoob.com/python3/python3-tutorial.html)\n- 入门快速：无需文档即可直接接触到 OneBot 标准\n\n\n### How to use\n\n1. 安装 [Python](https://www.python.org/downloads/) 3.7 或以上 环境\n2. 命令行中执行 `pip install websocket-client`\n3. 启动任意一个 [OneBot](https://github.com/botuniverse/onebot/blob/master/ecosystem.md#onebot-%E5%AE%9E%E7%8E%B0) 实现，如 `go-cqhttp` ，并打开 `正向WS`\n4. 在 `voidbot.py` 文件中 注释位置编写你的插件\n5. 使用 `Python` 直接运行 `voidbot.py` 文件\n\n你的插件通过基类 **Plugin** 的一个子类来实现。你只需要写一个继承 **Plugin** 的子类并重写 **match** 和 **handle** 方法就能快速实现插件功能\n\n\n### 说明\n\n\n###### API\n\n|       API        |      功能      | 说明 |\n| ---------------- | ------------- | ---- |\n| send_msg         | 发送消息       |      |\n| send_group_msg   | 发送群聊消息   |      |\n| send_private_msg | 发送私聊消息   |      |\n\n###### 消息段\n\n| 消息段 |  功能   | 说明 |\n| ------ | ------ | ---- |\n| text   | 纯文本  |      |\n| image  | 图片   |      |\n| record | 语音   |      |\n| at     | 艾特   |      |\n| xml    | XML    |      |\n| json   | JSON   |      |\n\n\n###### 匹配\n\n|       RULE        |       功能       | 说明 |\n| ---------------- | ---------------- | ---- |\n| on_full_match    | 完全匹配消息      |      |\n| on_reg_match     | 正则匹配消息      |      |\n| only_to_me       | 被艾特或者被喊名字 |      |\n| super_user       | 发送者为主人      |      |\n| admin_user       | 发送者为群管理    |      |\n\n\n以上提供常用的封装，可按例子自行仿照扩充。你可以在[这里](https://github.com/botuniverse/onebot)查看 `OneBot` 标准的文档","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloattech%2Fvoidbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloattech%2Fvoidbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloattech%2Fvoidbot/lists"}