From 819f5dd8e525406479816929042443330a89a84e 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: Fri, 14 Feb 2025 14:50:00 +0800 Subject: [PATCH] fix: #785 --- src/onebot/action/group/SetGroupBan.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/onebot/action/group/SetGroupBan.ts b/src/onebot/action/group/SetGroupBan.ts index 4fd22f35..aa5cdf26 100644 --- a/src/onebot/action/group/SetGroupBan.ts +++ b/src/onebot/action/group/SetGroupBan.ts @@ -13,11 +13,10 @@ type Payload = Static; export default class SetGroupBan extends OneBotAction { override actionName = ActionName.SetGroupBan; override payloadSchema = SchemaData; - async _handle(payload: Payload): Promise { const uid = await this.core.apis.UserApi.getUidByUinV2(payload.user_id.toString()); if (!uid) throw new Error('uid error'); - // 例如无管理员权限时 result: 120101005 errMsg: 'ERR_NOT_GROUP_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 }]); if (ret.result !== 0) throw new Error(ret.errMsg);