utils

package
v0.0.0-...-e09407b Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MESSAGE_BLOCK  uint = 0
	MESSAGE_IGNORE uint = 1
)

Variables

This section is empty.

Functions

func FatalError

func FatalError(err error)

Types

type BotIdType

type BotIdType struct {
	Common  int64
	Offical string
}

type GroupIdType

type GroupIdType struct {
	Common  int64
	Offical string
}

type Msg

type Msg struct {
	Text   string
	At     bool
	Image  string
	Images []string
}

type MsgIdType

type MsgIdType struct {
	Common  int64
	Offical string
}

type Plugin

type Plugin interface {
	Do(ctx *context.Context, botId *BotIdType, groupId *GroupIdType, userId *UserIdType, groupName string, messageId *MsgIdType, rawMsg, card string, botRole, userRole, super bool) (retStuct RetStuct)
}

type ReqType

type ReqType int
const (
	GroupBan   ReqType = iota // 频道禁言
	RelieveBan                // 禁言解除
	GroupKick                 // 频道踢人
	GroupMsg                  // 频道消息
	GroupLeave                // 退频道
	DeleteMsg                 // 消息撤回
	Undefined                 // 未定义
)

type RetStuct

type RetStuct struct {
	RetVal         uint
	ReplyMsg       *Msg
	ReqType        ReqType
	Duration       int64
	BanId          int64
	RejectAddAgain bool
	Retract        int
	MsgId          int64
	OfficalMsgId   string
}

type UserIdType

type UserIdType struct {
	Common  int64
	Offical string
}

Jump to

Keyboard shortcuts

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