diff --git a/src/core/services/NodeIKernelGroupService.ts b/src/core/services/NodeIKernelGroupService.ts index 49e77849..eff7a1e1 100644 --- a/src/core/services/NodeIKernelGroupService.ts +++ b/src/core/services/NodeIKernelGroupService.ts @@ -233,7 +233,7 @@ export interface NodeIKernelGroupService { getGroupStatisticInfo(groupCode: string): unknown; getGroupRemainAtTimes(groupCode: string): Promise & { - errMsg: string, + errCode: number, atInfo: { canAtAll: boolean RemainAtAllCountForUin: number diff --git a/src/onebot/action/go-cqhttp/GetGroupAtAllRemain.ts b/src/onebot/action/go-cqhttp/GetGroupAtAllRemain.ts index 98ca6749..be9f2fb5 100644 --- a/src/onebot/action/go-cqhttp/GetGroupAtAllRemain.ts +++ b/src/onebot/action/go-cqhttp/GetGroupAtAllRemain.ts @@ -17,8 +17,8 @@ export class GoCQHTTPGetGroupAtAllRemain extends BaseAction { async _handle(payload: Payload) { const ret = await this.core.apis.GroupApi.getGroupRemainAtTimes(payload.group_id.toString()); - if (!ret.atInfo || ret.result !== 0) { - throw new Error('atInfo not found'); + if (ret.errCode !== 0) { + throw new Error('Not in the group'); } const data = { can_at_all: ret.atInfo.canAtAll,