Skip to content

Commit

Permalink
fix: set_group_ban limit error (#1846)
Browse files Browse the repository at this point in the history
* fix: set_group_ban limit error
  • Loading branch information
Pandaft committed Feb 4, 2023
1 parent a8bed3f commit 2483eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coolq/api.go
Expand Up @@ -1166,7 +1166,7 @@ func (bot *CQBot) CQSetGroupBan(groupID, userID int64, duration uint32) global.M
if m := g.FindMember(userID); m != nil {
err := m.Mute(duration)
if err != nil {
if duration > 2592000 {
if duration >= 2592000 {
return Failed(100, "DURATION_IS_NOT_IN_RANGE", "非法的禁言时长")
}
return Failed(100, "NOT_MANAGEABLE", "机器人权限不足")
Expand Down

0 comments on commit 2483eb0

Please sign in to comment.