mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
feat: qidian_get_account_info.
This commit is contained in:
parent
dfcd9a523c
commit
605d8bb07d
12
coolq/api.go
12
coolq/api.go
@ -46,6 +46,18 @@ func (bot *CQBot) CQGetLoginInfo() MSG {
|
||||
return OK(MSG{"user_id": bot.Client.Uin, "nickname": bot.Client.Nickname})
|
||||
}
|
||||
|
||||
// CQGetQiDianAccountInfo 获取企点账号信息
|
||||
func (bot *CQBot) CQGetQiDianAccountInfo() MSG {
|
||||
if bot.Client.QiDian == nil {
|
||||
return Failed(100, "QIDIAN_PROTOCOL_REQUEST", "请使用企点协议")
|
||||
}
|
||||
return OK(MSG{
|
||||
"master_id": bot.Client.QiDian.MasterUin,
|
||||
"ext_name": bot.Client.QiDian.ExtName,
|
||||
"create_time": bot.Client.QiDian.CreateTime,
|
||||
})
|
||||
}
|
||||
|
||||
// CQGetFriendList 获取好友列表
|
||||
//
|
||||
// https://git.io/Jtz1L
|
||||
|
@ -24,6 +24,10 @@ func getLoginInfo(bot *coolq.CQBot, _ resultGetter) coolq.MSG {
|
||||
return bot.CQGetLoginInfo()
|
||||
}
|
||||
|
||||
func getQiDianAccountInfo(bot *coolq.CQBot, _ resultGetter) coolq.MSG {
|
||||
return bot.CQGetQiDianAccountInfo()
|
||||
}
|
||||
|
||||
func getFriendList(bot *coolq.CQBot, _ resultGetter) coolq.MSG {
|
||||
return bot.CQGetFriendList()
|
||||
}
|
||||
@ -393,6 +397,7 @@ var API = map[string]func(*coolq.CQBot, resultGetter) coolq.MSG{
|
||||
"check_url_safely": checkURLSafely,
|
||||
"set_group_anonymous_ban": setGroupAnonymousBan,
|
||||
".handle_quick_operation": handleQuickOperation,
|
||||
"qidian_get_account_info": getQiDianAccountInfo,
|
||||
}
|
||||
|
||||
func (api *apiCaller) callAPI(action string, p resultGetter) coolq.MSG {
|
||||
|
Loading…
x
Reference in New Issue
Block a user