Skip to content

Zhin.js用 TypeScript 写一个跨平台聊天机器人

一套代码,同时跑在 QQ、Discord、Telegram、飞书、钉钉、Slack 等 20+ 平台。可选接入 AI Agent。

Zhin

10 行代码,一个能用的机器人

typescript
import { usePlugin, addCommand } from 'zhin.js'

const plugin = usePlugin()

addCommand('hello')
  .action(() => '你好!我是 Zhin.js 机器人 🤖')

addCommand('echo <text>')
  .action((_, text) => text)

保存文件,机器人自动热重载。在 QQ、Discord 或任何已配置的平台发送 /hello,立刻收到回复。

基于 MIT 许可发布