1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

fix: set_group_ban limit error (#1846)

* fix: set_group_ban limit error
This commit is contained in:
Pandaft 2023-02-04 13:07:34 +08:00 committed by GitHub
parent a8bed3fc03
commit 2483eb09c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1166,7 +1166,7 @@ func (bot *CQBot) CQSetGroupBan(groupID, userID int64, duration uint32) global.M
if m := g.FindMember(userID); m != nil { if m := g.FindMember(userID); m != nil {
err := m.Mute(duration) err := m.Mute(duration)
if err != nil { if err != nil {
if duration > 2592000 { if duration >= 2592000 {
return Failed(100, "DURATION_IS_NOT_IN_RANGE", "非法的禁言时长") return Failed(100, "DURATION_IS_NOT_IN_RANGE", "非法的禁言时长")
} }
return Failed(100, "NOT_MANAGEABLE", "机器人权限不足") return Failed(100, "NOT_MANAGEABLE", "机器人权限不足")