From a3b70d0f1fe98ad02e5c07a65ba4720369bc38ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 5 Mar 2025 21:14:52 +0800 Subject: [PATCH] fix --- src/onebot/action/group/SetGroupBan.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/onebot/action/group/SetGroupBan.ts b/src/onebot/action/group/SetGroupBan.ts index fd98030e..3f30aa1f 100644 --- a/src/onebot/action/group/SetGroupBan.ts +++ b/src/onebot/action/group/SetGroupBan.ts @@ -18,7 +18,6 @@ export default class SetGroupBan extends OneBotAction { if (!uid) throw new Error('uid error'); let member_role = (await this.core.apis.GroupApi.getGroupMemberEx(payload.group_id.toString(), uid, true))?.role; if (member_role === 4) throw new Error('cannot ban owner'); - if (member_role === 3) throw new Error('cannot ban admin'); // 例如无管理员权限时 result为 120101005 errMsg为 'ERR_NOT_GROUP_ADMIN' let ret = await this.core.apis.GroupApi.banMember(payload.group_id.toString(), [{ uid: uid, timeStamp: +payload.duration }]);