nilbot

package module
v0.0.0-...-28bcc08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 1 Imported by: 2

README

NilBot

高扩展性,Serverless,支持一对多的QQ机器人

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICaller

type APICaller interface {
	CallAPI(req *APIRequest) (resp *APIResponse, err error)
}

APICaller defines basic abilities of supported api caller.

type APIRequest

type APIRequest struct {
	Action string `json:"action"`
	Echo   string `json:"echo"`
	Params MSG    `json:"params"`
}

APIRequest is used to communicate with onebot client. https://github.com/botuniverse/onebot-11/blob/master/communication/ws.md

type APIResponse

type APIResponse struct {
	Data    gjson.Result `json:"data"`
	Echo    string       `json:"echo"`
	Msg     string       `json:"msg"`
	RetCode int64        `json:"retcode"`
	Status  string       `json:"status"`
	Wording string       `json:"wording"`
}

APIResponse is the response of calling API https://github.com/botuniverse/onebot-11/blob/master/communication/ws.md

type EventHandler

type EventHandler interface {
	Handle(payload []byte, apiCaller APICaller)
}

EventHandler basic abilities of event handler.

type MSG

type MSG map[string]any

MSG represents map[string]any

Directories

Path Synopsis
internal
Package utils 含有一些实用函数
Package utils 含有一些实用函数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL