Skip to content
Proyectos

Acerca de

一个基于onebot协议的机器人Go开发框架

Ciencia e ingeniería

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

ZeroBot

Go Report Card golangci-lint Badge Badge License qq group

⚡️ 快速使用

package main

import (
	zero "github.com/wdvxdr1123/ZeroBot"
	"github.com/wdvxdr1123/ZeroBot/driver"
)

func main() {
	zero.OnCommand("hello").
            Handle(func(ctx *zero.Ctx) {
                ctx.Send("world")
            })

	zero.RunAndBlock(&zero.Config{
		NickName:      []string{"bot"},
		CommandPrefix: "/",
		SuperUsers:    []int64{123456},
		Driver: []zero.Driver{
			// 正向 WS
			driver.NewWebSocketClient("ws://127.0.0.1:6700", ""),
			// 反向 WS
			driver.NewWebSocketServer(16, "ws://127.0.0.1:6701", ""),
			// HTTP
			driver.NewHTTPClient("http://127.0.0.1:6701", "", "http://127.0.0.1:6700", ""),
		},
	}, nil)
}

📖 文档

--> 点击这里查看文档 <--

🎯 特性

  • 通过 init 函数实现插件式
  • 底层与 Onebot 通信驱动可换,目前支持HTTP、正向/反向WS,且支持基于 unix socket 的通信(使用 ws+unix://)
  • 通过添加多个 driver 实现多Q机器人支持
  • 完整的 OneBot 11 标准 API + NapCat / NapNeko 扩展 API 支持

关联项目

特别感谢

同时感谢以下开发者对 ZeroBot 作出的贡献:

Explorar proyectos relacionados

Cargando…