robot

package
v0.26.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyHandlers

func ApplyHandlers(msg *wcferry.WxMsg) string

func Reset

func Reset()

func ResetHandlers

func ResetHandlers()

func Start

func Start()

Types

type Handler

type Handler struct {
	Level    int32       // 0:不限制 7:群管理 9:创始人
	Order    int32       // 排序,越小越靠前
	Roomid   string      // 使用场景 [*:所有,-:私聊,+:群聊,其他:群聊]
	Command  string      // 指令
	Describe string      // 指令的描述信息
	PreCheck HandlerFunc // 前置检查,可拦截文本聊天内容
	Callback HandlerFunc // 指令回调,返回回复内容
}

func GetHandlers

func GetHandlers() []*Handler

type HandlerFunc

type HandlerFunc func(*wcferry.WxMsg) string

Jump to

Keyboard shortcuts

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