1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-07-05 13:53:26 +00:00
This commit is contained in:
Mrs4s
2021-11-24 00:03:56 +08:00
parent 7e6eaa7627
commit 9c5515ca9f

View File

@ -71,14 +71,14 @@ type (
// GuildRole 频道身份组信息 // GuildRole 频道身份组信息
GuildRole struct { GuildRole struct {
RoleId uint64 RoleId uint64
RoleName string RoleName string
ArgbColor uint32 ArgbColor uint32
Indepedent bool Independent bool
Num int32 Num int32
Owned bool Owned bool
Disabled bool Disabled bool
MaxNum int32 MaxNum int32
} }
// ChannelInfo 子频道信息 // ChannelInfo 子频道信息
@ -311,14 +311,14 @@ func (s *GuildService) GetGuildRoles(guildId uint64) ([]*GuildRole, error) {
roles := make([]*GuildRole, 0, len(body.Roles)) roles := make([]*GuildRole, 0, len(body.Roles))
for _, role := range body.Roles { for _, role := range body.Roles {
roles = append(roles, &GuildRole{ roles = append(roles, &GuildRole{
RoleId: role.GetRoleId(), RoleId: role.GetRoleId(),
RoleName: role.GetName(), RoleName: role.GetName(),
ArgbColor: role.GetArgbColor(), ArgbColor: role.GetArgbColor(),
Indepedent: role.GetIndependent() == 1, Independent: role.GetIndependent() == 1,
Num: role.GetNum(), Num: role.GetNum(),
Owned: role.GetOwned() == 1, Owned: role.GetOwned() == 1,
Disabled: role.GetDisabled() == 1, Disabled: role.GetDisabled() == 1,
MaxNum: role.GetMaxNum(), MaxNum: role.GetMaxNum(),
}) })
} }
return roles, nil return roles, nil