Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta42 #147

Merged
merged 4 commits into from
Nov 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions handlers/get_group_list.go
Original file line number Diff line number Diff line change
@@ -86,7 +86,6 @@ func getGroupList(client callapi.Client, api openapi.OpenAPI, apiv2 openapi.Open
return
}
}
var groups []Group
for _, guild := range guilds {
joinedAtTime, err := guild.JoinedAt.Time()
if err != nil {
@@ -103,7 +102,7 @@ func getGroupList(client callapi.Client, api openapi.OpenAPI, apiv2 openapi.Open
MaxMemberCount: strconv.FormatInt(guild.MaxMembers, 10),
MemberCount: strconv.Itoa(guild.MemberCount),
}
groups = append(groups, group)
groupList.Data = append(groupList.Data, group)
// 获取每个guild的channel信息
channels, err := api.Channels(context.TODO(), guild.ID) // 使用guild.ID作为参数
if err != nil {
@@ -126,11 +125,9 @@ func getGroupList(client callapi.Client, api openapi.OpenAPI, apiv2 openapi.Open
MaxMemberCount: "", // 频道没有直接对应的最大成员数字段
MemberCount: "", // 频道没有直接对应的成员数字段
}
groups = append(groups, channelGroup)
groupList.Data = append(groupList.Data, channelGroup)
}
}

groupList.Data = groups
groupList.Message = ""
groupList.RetCode = 0
groupList.Status = "ok"