utils

package
v0.0.0-...-0dd6052 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var PluginSet map[string]Plugin

Functions

func FatalError

func FatalError(err error)

func Register

func Register(k string, v Plugin)

Types

type Msg

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

type Plugin

type Plugin interface {
	Do(ctx *context.Context, messageType public.MessageType, admins []string, gmap map[string][]string, guildId, channelId, userId, msg, msgId, username, avatar, srcGuildID string, useRole []string, isBot, isDirectMessage, botIsAdmin bool, priceSearch string, attachments []string) (retStuct RetStuct)
}

type ReqType

type ReqType int
const (
	GuildBan   ReqType = iota // 频道禁言
	RelieveBan                // 禁言解除
	GuildKick                 // 频道踢人
	GuildMsg                  // 频道消息
	GuildLeave                // 退频道
	DeleteMsg                 // 消息撤回
	Undefined                 // 未定义
)

type RetStuct

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

Jump to

Keyboard shortcuts

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