Merge pull request #470 from pohgxz/main

修复<get_group_at_all_remain>接口总是返回<Error: atInfo not found>
This commit is contained in:
手瓜一十雪 2024-10-27 22:10:55 +08:00 committed by GitHub
commit ffdc34cfe2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -233,7 +233,7 @@ export interface NodeIKernelGroupService {
getGroupStatisticInfo(groupCode: string): unknown;
getGroupRemainAtTimes(groupCode: string): Promise<Omit<GeneralCallResult, 'result'> & {
errMsg: string,
errCode: number,
atInfo: {
canAtAll: boolean
RemainAtAllCountForUin: number

View File

@ -17,8 +17,8 @@ export class GoCQHTTPGetGroupAtAllRemain extends BaseAction<Payload, any> {
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,