OPQBot

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 23 Imported by: 1

README

OPQBot 🎉

GitHub tag (latest SemVer pre-release) GitHub GitHub Workflow Status

功能 😄
功能 是否实现
群消息处理事件
好友消息处理事件
机器人事件处理
所有支持的消息发送
At
表情
撤回
下载文件
禁言
群公告
安装 💡

github.com/mcoo/OPQBot@latest 使用教程

请看 wiki

以example文件为准 example

没人看的更新历史 ✏️
20210318    简化发送代码
20210319    将宏移出BotManager,添加对发送队列每次发送时间的控制
20210322    添加发送函数的中间件
20210403    增加发送回调和优化中间件,基础功能完善
20210405    添加对撤回功能的完善和支持 注意看一下 example
20210406    戳一戳功能,example 即是文档
20210407    删除多余log,完善戳戳
20210420    添加Mp3转Silk功能和一些其他的功能
20210424    添加事件的中间件,向下兼容以前的代码,使用看example,完善silk功能
20210427    修复SocketIO数据畸形的问题,添加群上传功能
20210428    添加内置session 相关内容看Wiki
20210512    packet现在修改为传递指针,请注意
20210523    添加快捷发信息的函数

Documentation

Index

Constants

View Source
const (
	SendToTypeFriend               = 1
	SendToTypeGroup                = 2
	SendToTypePrivateChat          = 3
	EventNameOnGroupMessage        = "OnGroupMsgs"
	EventNameOnFriendMessage       = "OnFriendMsgs"
	EventNameOnBotEvent            = "OnFriendMsgs"
	EventNameOnGroupJoin           = "ON_EVENT_GROUP_JOIN"
	EventNameOnGroupAdmin          = "ON_EVENT_GROUP_ADMIN"
	EventNameOnGroupExit           = "ON_EVENT_GROUP_EXIT"
	EventNameOnGroupExitSuccess    = "ON_EVENT_GROUP_EXIT_SUCC"
	EventNameOnGroupAdminSysNotify = "ON_EVENT_GROUP_ADMINSYSNOTIFY"
	EventNameOnGroupRevoke         = "ON_EVENT_GROUP_REVOKE"
	EventNameOnGroupShut           = "ON_EVENT_GROUP_SHUT"
	EventNameOnGroupSystemNotify   = "ON_EVENT_GROUP_SYSTEMNOTIFY"
	EventNameOnConnected           = "connection"
	EventNameOnDisconnected        = "disconnection"
	EventNameOnOther               = "other"
)

Variables

This section is empty.

Functions

func MacroAt added in v0.0.7

func MacroAt(qqs []int64) string

MacroAt At宏

func MacroAtAll added in v0.0.7

func MacroAtAll() string

func MacroId added in v0.1.0

func MacroId() string

func VoiceMp3ToSilk added in v0.1.0

func VoiceMp3ToSilk(mp3Path string) (string, error)

VoiceMp3ToSilk Mp3转Silk mp3->silk Output: base64 String

func VoiceSilkToMp3 added in v0.1.0

func VoiceSilkToMp3(base64EncodedSilk string) ([]byte, error)

VoiceSilkToMp3 Silk转Mp3 silk->mp3 Output: []byte

Types

type BotManager

type BotManager struct {
	QQ            int64
	SendChan      chan SendMsgPack
	Running       bool
	OPQUrl        string
	MaxRetryCount int
	Done          chan int

	Session *session.Manager
	// contains filtered or unexported fields
}

func NewBotManager

func NewBotManager(QQ int64, OPQUrl string) BotManager

func (*BotManager) AddEvent

func (b *BotManager) AddEvent(EventName string, f ...interface{}) error

func (*BotManager) Announce added in v0.0.7

func (b *BotManager) Announce(title, text string, pinned, announceType int, groupID int64) error

Announce 发公告 Pinned 1为置顶,0为普通公告 announceType 发布类型(10为使用弹窗公告,20为发送给新成员,其他暂未知)

func (*BotManager) Chuo added in v0.1.0

func (b *BotManager) Chuo(sendType int, groupID, userId int64) error

Chuo 戳戳 sendType 0戳好友 1戳群友 sendType=0 时可以不填此字段 sendType=1 时不能为空

func (*BotManager) GetFile added in v0.0.7

func (b *BotManager) GetFile(fileId string, groupID int64) (FriendFileResult, GroupFileResult, error)

GetFile 下载文件 groupId 为0 是下载好友分享文件

func (*BotManager) GetFriendList added in v0.1.0

func (b *BotManager) GetFriendList(startIndex int) (FriendList, error)

GetFriendList 获取好友列表

func (*BotManager) GetGroupList added in v0.1.0

func (b *BotManager) GetGroupList(nextToken string) (GroupList, error)

GetGroupList 获取群列表

func (*BotManager) GetGroupMemberList added in v0.1.4

func (b *BotManager) GetGroupMemberList(groupID, LastUin int64) (GroupMemberList, error)

GetGroupMemberList 获取群成员列表

func (*BotManager) GetUserCardInfo added in v0.1.0

func (b *BotManager) GetUserCardInfo(qq int64) (UserCardInfo, error)

GetUserCardInfo 获取用户信息

func (*BotManager) GetUserCookie added in v0.1.3

func (b *BotManager) GetUserCookie() (Cookie, error)

GetUserCookie 获取QQ相关ck

func (*BotManager) GetUserInfo added in v0.0.7

func (b *BotManager) GetUserInfo(qq int64) (UserInfo, error)

GetUserInfo 获取用户信息

func (*BotManager) KickGroupMember added in v0.1.0

func (b *BotManager) KickGroupMember(groupID, userId int64) error

KickGroupMember 踢出群成员

func (*BotManager) OldSendVoice added in v0.1.0

func (b *BotManager) OldSendVoice(userID int64, sendToType int, data string) error

OldSendVoice 发送语音 旧版 将被移出

func (*BotManager) ReCallMsg

func (b *BotManager) ReCallMsg(GroupID, MsgRandom int64, MsgSeq int) error

ReCallMsg 撤回消息

func (*BotManager) RefreshKey added in v0.0.7

func (b *BotManager) RefreshKey() error

RefreshKey 刷新Key

func (*BotManager) RegSendMiddleware added in v0.1.0

func (b *BotManager) RegSendMiddleware(priority int, f func(m map[string]interface{}) map[string]interface{}) error

RegSendMiddleware 注册 发送函数的中间件 2为最先执行 0为最后执行

func (*BotManager) Send

func (b *BotManager) Send(sendMsgPack SendMsgPack)

Send 发送消息函数

func (*BotManager) SendFriendPicMsg added in v0.1.4

func (b *BotManager) SendFriendPicMsg(FriendUin int64, Content string, Pic []byte)

SendFriendPicMsg 发送图片信息给好友

func (*BotManager) SendFriendTextMsg added in v0.1.4

func (b *BotManager) SendFriendTextMsg(FriendUin int64, Content string)

SendFriendTextMsg 发送文字信息给好友

func (*BotManager) SendGroupJsonMsg added in v0.1.4

func (b *BotManager) SendGroupJsonMsg(GroupUin int64, Content string)

SendGroupJsonMsg 发送JSON信息给群

func (*BotManager) SendGroupPicMsg added in v0.1.4

func (b *BotManager) SendGroupPicMsg(GroupUin int64, Content string, Pic []byte)

SendGroupPicMsg 发送图片信息给群

func (*BotManager) SendGroupTextMsg added in v0.1.4

func (b *BotManager) SendGroupTextMsg(GroupUin int64, Content string)

SendGroupTextMsg 发送文字信息给群

func (*BotManager) SendGroupXmlMsg added in v0.1.4

func (b *BotManager) SendGroupXmlMsg(GroupUin int64, Content string)

SendGroupXmlMsg 发送Xml信息给群

func (*BotManager) SetAdmin added in v0.0.7

func (b *BotManager) SetAdmin(flag int, groupID, userId int64) error

SetAdmin 设置管理员 flag 1为设置管理员 2为取消管理员

func (*BotManager) SetForbidden added in v0.0.7

func (b *BotManager) SetForbidden(flag, ShutTime int, groupID, userId int64) error

SetForbidden 设置禁言 flag 0为设置全体禁言 1为设置某人禁言 ShutTime 0为取消禁言 >0为禁言分钟数 全体禁言>0为开启禁言

func (*BotManager) SetGroupNewNick added in v0.1.0

func (b *BotManager) SetGroupNewNick(newNick string, groupID, userId int64) error

SetGroupNewNick 设置群名片

func (*BotManager) SetGroupUniqueTitle added in v0.1.0

func (b *BotManager) SetGroupUniqueTitle(newNick string, groupID, userId int64) error

SetGroupUniqueTitle 设置群头衔

func (*BotManager) SetMaxRetryCount added in v0.1.2

func (b *BotManager) SetMaxRetryCount(maxRetryCount int)

func (*BotManager) SetSendDelayed added in v0.0.7

func (b *BotManager) SetSendDelayed(Millisecond int)

SetSendDelayed 设置发送消息的时延 单位毫秒 默认1000

func (*BotManager) Start

func (b *BotManager) Start() error

Start 开始连接

func (*BotManager) Stop

func (b *BotManager) Stop()

Stop 停止

func (*BotManager) UploadFileWithBase64 added in v0.1.1

func (b *BotManager) UploadFileWithBase64(FileName, FileBase64 string, ToUserUid int64, Notify bool) error

UploadFileWithBase64 上传群文件

func (*BotManager) UploadFileWithFilePath added in v0.1.1

func (b *BotManager) UploadFileWithFilePath(FilePath string, ToUserUid int64, Notify bool) error

UploadFileWithFilePath 上传群文件

func (*BotManager) UploadFileWithFileUrl added in v0.1.1

func (b *BotManager) UploadFileWithFileUrl(FileName, FileUrl string, ToUserUid int64, Notify bool) error

UploadFileWithFileUrl 上传群文件

func (*BotManager) Wait added in v0.1.2

func (b *BotManager) Wait()

func (*BotManager) Zan added in v0.0.7

func (b *BotManager) Zan(qq int64, num int) int

Zan QQ赞 次数

type Context added in v0.1.0

type Context struct {
	NowIndex int
	MaxIndex int

	Bot *BotManager
	// contains filtered or unexported fields
}

func (*Context) Next added in v0.1.0

func (ctx *Context) Next(currentQQ int64, result interface{})
type Cookie struct {
	ClientKey string `json:"ClientKey"`
	Cookies   string `json:"Cookies"`
	Gtk       string `json:"Gtk"`
	Gtk32     string `json:"Gtk32"`
	PSkey     struct {
		Connect     string `json:"connect"`
		Docs        string `json:"docs"`
		Docx        string `json:"docx"`
		Game        string `json:"game"`
		Gamecenter  string `json:"gamecenter"`
		Imgcache    string `json:"imgcache"`
		MTencentCom string `json:"m.tencent.com"`
		Mail        string `json:"mail"`
		Mma         string `json:"mma"`
		Now         string `json:"now"`
		Office      string `json:"office"`
		Openmobile  string `json:"openmobile"`
		Qqweb       string `json:"qqweb"`
		Qun         string `json:"qun"`
		Qzone       string `json:"qzone"`
		QzoneCom    string `json:"qzone.com"`
		TenpayCom   string `json:"tenpay.com"`
		Ti          string `json:"ti"`
		Vip         string `json:"vip"`
		Weishi      string `json:"weishi"`
	} `json:"PSkey"`
	Skey string `json:"Skey"`
}

type FriendFileResult added in v0.0.7

type FriendFileResult struct {
	FileName string `json:"FileName"`
	FileSize int    `json:"FileSize"`
	FromUin  int64  `json:"FromUin"`
	URL      string `json:"Url"`
}

type FriendList added in v0.1.0

type FriendList struct {
	FriendCount int `json:"Friend_count"`
	Friendlist  []struct {
		FriendUin int64  `json:"FriendUin"`
		IsRemark  bool   `json:"IsRemark"`
		NickName  string `json:"NickName"`
		OnlineStr string `json:"OnlineStr"`
		Remark    string `json:"Remark"`
		Status    int    `json:"Status"`
	} `json:"Friendlist"`
	GetfriendCount    int `json:"GetfriendCount"`
	StartIndex        int `json:"StartIndex"`
	TotoalFriendCount int `json:"Totoal_friend_count"`
}

FriendList 获取好友列表表单

type FriendMsgPack added in v0.0.2

type FriendMsgPack struct {
	Context
	Content    string      `json:"Content"`
	FromUin    int64       `json:"FromUin"`
	MsgSeq     int         `json:"MsgSeq"`
	MsgType    string      `json:"MsgType"`
	RedBaginfo interface{} `json:"RedBaginfo"`
	ToUin      int64       `json:"ToUin"`
}

type GroupAdminPack added in v0.0.2

type GroupAdminPack struct {
	Context
	EventData struct {
		Flag    int   `json:"Flag"`
		GroupID int64 `json:"GroupID"`
		UserID  int64 `json:"UserID"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type GroupAdminSysNotifyPack added in v0.0.2

type GroupAdminSysNotifyPack struct {
	Context
	EventData struct {
		Seq             int64  `json:"Seq"`
		Type            int    `json:"Type"`
		MsgTypeStr      string `json:"MsgTypeStr"`
		Who             int    `json:"Who"`
		WhoName         string `json:"WhoName"`
		MsgStatusStr    string `json:"MsgStatusStr"`
		Content         string `json:"Content"`
		RefuseContent   string `json:"RefuseContent"`
		Flag7           int    `json:"Flag_7"`
		Flag8           int    `json:"Flag_8"`
		GroupID         int64  `json:"GroupId"`
		GroupName       string `json:"GroupName"`
		ActionUin       int64  `json:"ActionUin"`
		ActionName      string `json:"ActionName"`
		ActionGroupCard string `json:"ActionGroupCard"`
		Action          int    `json:"Action"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type GroupExitPack added in v0.0.2

type GroupExitPack struct {
	Context
	EventData struct {
		UserID int64 `json:"UserID"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type GroupExitSuccessPack added in v0.0.2

type GroupExitSuccessPack struct {
	Context
	EventData struct {
		GroupID int64 `json:"GroupID"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type GroupFileResult added in v0.0.7

type GroupFileResult struct {
	Ret int    `json:"Ret"`
	URL string `json:"Url"`
}

type GroupJoinPack added in v0.0.2

type GroupJoinPack struct {
	Context
	EventData struct {
		InviteUin int64  `json:"InviteUin"`
		UserID    int64  `json:"UserID"`
		UserName  string `json:"UserName"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type GroupList added in v0.1.0

type GroupList struct {
	Count     int    `json:"Count"`
	NextToken string `json:"NextToken"`
	TroopList []struct {
		GroupID          int64  `json:"GroupId"`
		GroupMemberCount int64  `json:"GroupMemberCount"`
		GroupName        string `json:"GroupName"`
		GroupNotice      string `json:"GroupNotice"`
		GroupOwner       int64  `json:"GroupOwner"`
		GroupTotalCount  int    `json:"GroupTotalCount"`
	} `json:"TroopList"`
}

GroupList 获取群列表表单

type GroupMemberList added in v0.1.4

type GroupMemberList struct {
	Count      int   `json:"Count"`
	GroupUin   int64 `json:"GroupUin"`
	LastUin    int64 `json:"LastUin"`
	MemberList []struct {
		Age           int    `json:"Age"`
		AutoRemark    string `json:"AutoRemark"`
		CreditLevel   int    `json:"CreditLevel"`
		Email         string `json:"Email"`
		FaceID        int    `json:"FaceId"`
		Gender        int    `json:"Gender"`
		GroupAdmin    int    `json:"GroupAdmin"`
		GroupCard     string `json:"GroupCard"`
		JoinTime      int    `json:"JoinTime"`
		LastSpeakTime int    `json:"LastSpeakTime"`
		MemberLevel   int    `json:"MemberLevel"`
		MemberUin     int64  `json:"MemberUin"`
		Memo          string `json:"Memo"`
		NickName      string `json:"NickName"`
		ShowName      string `json:"ShowName"`
		SpecialTitle  string `json:"SpecialTitle"`
		Status        int    `json:"Status"`
	} `json:"MemberList"`
}

type GroupMsgPack added in v0.0.2

type GroupMsgPack struct {
	Context
	Content       string      `json:"Content"`
	FromGroupID   int64       `json:"FromGroupId"`
	FromGroupName string      `json:"FromGroupName"`
	FromNickName  string      `json:"FromNickName"`
	FromUserID    int64       `json:"FromUserId"`
	MsgRandom     int64       `json:"MsgRandom"`
	MsgSeq        int         `json:"MsgSeq"`
	MsgTime       int         `json:"MsgTime"`
	MsgType       string      `json:"MsgType"`
	RedBaginfo    interface{} `json:"RedBaginfo"`
}

type GroupRevokePack added in v0.0.2

type GroupRevokePack struct {
	Context
	EventData struct {
		AdminUserID int   `json:"AdminUserID"`
		GroupID     int64 `json:"GroupID"`
		MsgRandom   int64 `json:"MsgRandom"`
		MsgSeq      int   `json:"MsgSeq"`
		UserID      int64 `json:"UserID"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type GroupShutPack added in v0.0.2

type GroupShutPack struct {
	Context
	EventData struct {
		GroupID  int64 `json:"GroupID"`
		ShutTime int   `json:"ShutTime"`
		UserID   int64 `json:"UserID"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type GroupSystemNotifyPack added in v0.0.2

type GroupSystemNotifyPack struct {
	Context
	EventData struct {
		Content string `json:"Content"`
		GroupID int64  `json:"GroupID"`
		UserID  int64  `json:"UserID"`
	} `json:"EventData"`
	EventMsg struct {
		FromUin    int64       `json:"FromUin"`
		ToUin      int64       `json:"ToUin"`
		MsgType    string      `json:"MsgType"`
		MsgSeq     int         `json:"MsgSeq"`
		Content    string      `json:"Content"`
		RedBaginfo interface{} `json:"RedBaginfo"`
	} `json:"EventMsg"`
}

type MyRecord added in v0.1.0

type MyRecord struct {
	FromGroupID int64  `json:"FromGroupId"`
	MsgRandom   int64  `json:"MsgRandom"`
	MsgSeq      int    `json:"MsgSeq"`
	MsgTime     int    `json:"MsgTime"`
	MsgType     string `json:"MsgType"`
	Content     string `json:"Content"`
}

type Result added in v0.0.7

type Result struct {
	Msg string `json:"Msg"`
	Ret int    `json:"Ret"`
}

type SendMsgPack

type SendMsgPack struct {
	SendToType   int
	ToUserUid    int64
	Content      interface{}
	CallbackFunc func(Code int, Info string, record MyRecord)
}

type SendTypeForwordContent

type SendTypeForwordContent struct {
	ForwordBuf   string
	ForwordField int
}

type SendTypeForwordContentPrivateChat

type SendTypeForwordContentPrivateChat struct {
	ForwordBuf   string
	ForwordField int
	Group        int64
}

type SendTypeJsonContent

type SendTypeJsonContent struct {
	Content string
}

type SendTypeJsonContentPrivateChat

type SendTypeJsonContentPrivateChat struct {
	Content string
	Group   int64
}

type SendTypePicMsgByBase64Content added in v0.0.7

type SendTypePicMsgByBase64Content struct {
	Content string
	Base64  string
	Flash   bool
}

type SendTypePicMsgByBase64ContentPrivateChat added in v0.0.7

type SendTypePicMsgByBase64ContentPrivateChat struct {
	Content string
	Base64  string
	Group   int64
	Flash   bool
}

type SendTypePicMsgByLocalContent

type SendTypePicMsgByLocalContent struct {
	Content string
	Path    string
	Flash   bool
}

type SendTypePicMsgByLocalContentPrivateChat

type SendTypePicMsgByLocalContentPrivateChat struct {
	Content string
	Path    string
	Group   int64
	Flash   bool
}

type SendTypePicMsgByMd5Content

type SendTypePicMsgByMd5Content struct {
	Content string
	Md5     string
	Flash   bool
}

type SendTypePicMsgByMd5ContentPrivateChat

type SendTypePicMsgByMd5ContentPrivateChat struct {
	Content string
	Md5s    []string
	Group   int64
	Flash   bool
}

type SendTypePicMsgByUrlContent

type SendTypePicMsgByUrlContent struct {
	Content string
	PicUrl  string
	Flash   bool
}

type SendTypePicMsgByUrlContentPrivateChat

type SendTypePicMsgByUrlContentPrivateChat struct {
	Content string
	PicUrl  string
	Group   int64
	Flash   bool
}

type SendTypeRelayContent

type SendTypeRelayContent struct {
	ReplayInfo interface{}
}

type SendTypeRelayContentPrivateChat

type SendTypeRelayContentPrivateChat struct {
	ReplayInfo interface{}
	Group      int64
}

type SendTypeTextMsgContent

type SendTypeTextMsgContent struct {
	Content string
}

type SendTypeTextMsgContentPrivateChat

type SendTypeTextMsgContentPrivateChat struct {
	Content string
	Group   int64
}

type SendTypeVoiceByLocalContent

type SendTypeVoiceByLocalContent struct {
	Path string
}

type SendTypeVoiceByLocalContentPrivateChat

type SendTypeVoiceByLocalContentPrivateChat struct {
	Path  string
	Group int64
}

type SendTypeVoiceByUrlContent

type SendTypeVoiceByUrlContent struct {
	VoiceUrl string
}

type SendTypeVoiceByUrlContentPrivateChat

type SendTypeVoiceByUrlContentPrivateChat struct {
	VoiceUrl string
	Group    int64
}

type SendTypeXmlContent

type SendTypeXmlContent struct {
	Content string
}

type SendTypeXmlContentPrivateChat

type SendTypeXmlContentPrivateChat struct {
	Content string
	Group   int64
}

type UserCardInfo added in v0.1.0

type UserCardInfo struct {
	Age       int    `json:"Age"`
	City      string `json:"City"`
	LikeNums  int    `json:"LikeNums"`
	LoginDays int    `json:"LoginDays"`
	NickName  string `json:"NickName"`
	Province  string `json:"Province"`
	QQLevel   int    `json:"QQLevel"`
	QQUin     int64  `json:"QQUin"`
	Sex       int    `json:"Sex"`
}

type UserInfo added in v0.0.7

type UserInfo struct {
	Code int `json:"code"`
	Data struct {
		Astro         int    `json:"astro"`
		AvatarURL     string `json:"avatarUrl"`
		Bitmap        string `json:"bitmap"`
		Bluevip       int    `json:"bluevip"`
		Commfrd       int    `json:"commfrd"`
		Friendship    int    `json:"friendship"`
		From          string `json:"from"`
		Gender        int    `json:"gender"`
		Greenvip      int    `json:"greenvip"`
		IntimacyScore int    `json:"intimacyScore"`
		IsFriend      int    `json:"isFriend"`
		Logolabel     string `json:"logolabel"`
		Nickname      string `json:"nickname"`
		Publicwalfare int    `json:"publicwalfare"`
		Qqvip         int    `json:"qqvip"`
		Qzone         int    `json:"qzone"`
		Realname      string `json:"realname"`
		Smartname     string `json:"smartname"`
		Uin           int64  `json:"uin"`
	} `json:"data"`
	Default int    `json:"default"`
	Message string `json:"message"`
	Subcode int    `json:"subcode"`
}

UserInfo 用户信息表单

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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