util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CQCode

func CQCode(function string, keyvalue ...interface{}) string

CQCode 生成一段CQ码,value将被自动转义 panics if given an odd number of keyvalue.

func Escape

func Escape(str string) string

Escape 对于不在CQ码内的消息(即文本消息)进行转义 以防止它们被酷Q解析为CQ码

Types

type GroupInfo

type GroupInfo struct {
	ID   int64
	Name string
}

func UnpackGroupList

func UnpackGroupList(str string) ([]GroupInfo, error)

UnpackGroupList 解码群列表

type GroupMember

type GroupMember struct {
	//群号和Q号
	Group, QQ  int64
	Name, Card string
	//性别,0/男;1/女
	Gender             int32
	Age                int32
	Area               string
	JoinTime, LastChat time.Time
	Level              string
	//管理权限,1/成员;2/管理员;3/群主
	Auth int32
	//是否有不良记录
	Bad         bool
	Title       string
	TitleLife   time.Time
	CanSetTitle bool
}

GroupMember 群成员信息

func UnpackGroupMemberInfo

func UnpackGroupMemberInfo(str string) (m GroupMember, err error)

UnpackGroupMemberInfo 解码群成员信息

func UnpackGroupMemberList

func UnpackGroupMemberList(str string) ([]GroupMember, error)

UnpackGroupMemberList 解码群成员列表

Jump to

Keyboard shortcuts

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