Skip to content

Commit

Permalink
fix(lint): if-block
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Aug 1, 2023
1 parent a3ad233 commit 19dd37a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions coolq/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,13 +1151,12 @@ func (bot *CQBot) CQSetGroupKick(groupID int64, userID int64, msg string, block
if g := bot.Client.FindGroup(groupID); g != nil {
if m := g.FindMember(userID); m == nil {
return Failed(100, "MEMBER_IS_NOT_IN_GROUP", "人员不存在")
} else {
err := m.Kick(msg, block)
if err != nil {
return Failed(100, "NOT_MANAGEABLE", "机器人权限不足")
}
return OK(nil)
}
err := m.Kick(msg, block)

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / lint

undefined: m (typecheck)

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / lint

undefined: m) (typecheck)

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / lint

undefined: m) (typecheck)

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / lint

undefined: m) (typecheck)

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, 386)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, amd64)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, arm)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, arm64)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (windows, 386)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (windows, amd64)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (windows, arm)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (windows, arm64)

undefined: m

Check failure on line 1155 in coolq/api.go

View workflow job for this annotation

GitHub Actions / Build binary CI (darwin, amd64)

undefined: m
if err != nil {
return Failed(100, "NOT_MANAGEABLE", "机器人权限不足")
}
return OK(nil)
}
return Failed(100, "GROUP_NOT_FOUND", "群聊不存在")
}
Expand Down

0 comments on commit 19dd37a

Please sign in to comment.