Skip to main content

ZCBOT

通用化 IM 平台:不绑定任何聊天协议——能接 QQ、Telegram、Discord,也能不接平台,只跑定时任务或收 HTTP 事件。 需要哪种能力就启用对应的扩展,业务写在自己的插件里。

当前版本:v1.8.8 | CHANGELOG | PyPI


一分钟跑起来

方式 A · pip(推荐)

pip install zcbot
zcbot

配置与数据落在 ~/.zcbot(可用环境变量 ZCBOT_HOME 指定其它目录)。

方式 B · 源码

git clone https://github.com/kuangxing6367/zcbot.git
cd zcbot
pip install -r requirements.txt
python main.py

看到 框架启动完成,等待消息... 即启动成功(依赖缺了会自动补装)。

官方扩展默认全部关闭。 要哪种能力就启用哪个:把 core_plugins.yaml 里对应块的 enabled 改为 true, 或运行 python tools/scan_core_plugins.py --enable <扩展名>,重启生效。 进 Web 后台启用 webui(127.0.0.1:8080,默认账号 admin / admin123,登录后立即改密); 要收发聊天消息就启用某个接入端(如 onebot_adapter)。

详见 安装 · 开始使用 · 配置系统。

写个插件

plugins/hello/main.py:

__plugin_meta__ = {"name": "Hello", "version": "1.0.0",
                   "author": "你", "desc": "打招呼", "priority": 50}

def register(ctx):
    ctx.command("/hello", handle_hello, description="打个招呼")

async def handle_hello(event, match):
    await ctx.asend_msg(user_id=event.user_id,
                        group_id=event.group_id if event.is_group else None,
                        message="Hello, World!")

放进 plugins/ 后点「重载」即可。权限用 require_perm="myplugin.ban" 声明式拦截; 想插到几乎每个运行环节就用 ctx.hook(...)(见 扩展点)。 完整教程见 编写插件。

文档

全部文档平铺在 docs/ 一层,入口 docs/index.md。

开源协议

MIT + Apache 2.0 双协议,任选其一适用。

本项目以 AI 生成为主、人工辅助完成。用着顺手的话,给个 Star 吧!

Metadata

Release files for zcbot 1.8.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for zcbot 1.8.8
File Interpreter ABI Platform
zcbot-1.8.8-py3-none-any.whl Python 3 none any Details

Release files / zcbot-1.8.8-py3-none-any.whl

Download URL zcbot-1.8.8-py3-none-any.whl
Size 11.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1ee59f37d39576c9ca88ae5793f92ba8eaf46aa157434609474766b5be77f29d
BLAKE2b-256 checksum
How to use checksums
8216bc986c947cb9f9f3e55459bcd5a55287c022c18661d9311ce79f647a7605
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for zcbot 1.8.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.8.8 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page