diff --git a/src/core/services/NodeIKernelGroupService.ts b/src/core/services/NodeIKernelGroupService.ts index babcad73..d072b394 100644 --- a/src/core/services/NodeIKernelGroupService.ts +++ b/src/core/services/NodeIKernelGroupService.ts @@ -249,7 +249,7 @@ export interface NodeIKernelGroupService { reqToJoinGroup(groupCode: string, arg: unknown): void; - setGroupShutUp(groupCode: string, shutUp: boolean): void; + setGroupShutUp(groupCode: string, shutUp: boolean): Promise; getGroupShutUpMemberList(groupCode: string): Promise; diff --git a/src/onebot/action/group/SetGroupWholeBan.ts b/src/onebot/action/group/SetGroupWholeBan.ts index a4c84c44..3ff633ca 100644 --- a/src/onebot/action/group/SetGroupWholeBan.ts +++ b/src/onebot/action/group/SetGroupWholeBan.ts @@ -15,7 +15,10 @@ export default class SetGroupWholeBan extends OneBotAction { async _handle(payload: Payload): Promise { const enable = payload.enable?.toString() !== 'false'; - await this.core.apis.GroupApi.banGroup(payload.group_id.toString(), enable); + let res = await this.core.apis.GroupApi.banGroup(payload.group_id.toString(), enable); + if (res.result !== 0) { + throw new Error(`SetGroupWholeBan failed: ${res.errMsg} ${res.result}`); + } return null; } }