From 15b396251ce8e0b291215d25e4eb097af2731abb Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Sun, 7 Nov 2021 16:13:48 +0800 Subject: [PATCH] feat: get_guild_service_profile api --- coolq/api.go | 10 ++++++++++ modules/api/api.go | 2 ++ 2 files changed, 12 insertions(+) diff --git a/coolq/api.go b/coolq/api.go index 4c3b16f..1dbef38 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -50,6 +50,16 @@ func (bot *CQBot) CQGetQiDianAccountInfo() global.MSG { }) } +// CQGetGuildServiceProfile 获取频道系统个人资料 +// @route(get_guild_service_profile) +func (bot *CQBot) CQGetGuildServiceProfile() global.MSG { + return OK(global.MSG{ + "nickname": bot.Client.GuildService.Nickname, + "tiny_id": bot.Client.GuildService.TinyId, + "avatar_url": bot.Client.GuildService.AvatarUrl, + }) +} + // CQGetFriendList 获取好友列表 // // https://git.io/Jtz1L diff --git a/modules/api/api.go b/modules/api/api.go index 5bf68e4..9847d2a 100644 --- a/modules/api/api.go +++ b/modules/api/api.go @@ -123,6 +123,8 @@ func (c *Caller) call(action string, p Getter) global.MSG { return c.bot.CQGetGroupRootFiles(p0) case "get_group_system_msg": return c.bot.CQGetGroupSystemMessages() + case "get_guild_service_profile": + return c.bot.CQGetGuildServiceProfile() case "get_image": p0 := p.Get("file").String() return c.bot.CQGetImage(p0)