diff --git a/src/core b/src/core index b1351835..ed10e0fc 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit b1351835673f86d445d244fd515560bfcd0b7adb +Subproject commit ed10e0fc9f4b98ad2b677c8862f5cc817a5560ba diff --git a/src/onebot11/action/go-cqhttp/GetGroupHonorInfo.ts b/src/onebot11/action/go-cqhttp/GetGroupHonorInfo.ts index ba1a2711..95fceba4 100644 --- a/src/onebot11/action/go-cqhttp/GetGroupHonorInfo.ts +++ b/src/onebot11/action/go-cqhttp/GetGroupHonorInfo.ts @@ -3,18 +3,22 @@ import { OB11Constructor } from '../../constructor'; import { friends } from '@/core/data'; import BaseAction from '../BaseAction'; import { ActionName } from '../types'; -import { NTQQUserApi, WebApi } from '@/core/apis'; +import { NTQQUserApi, WebApi, WebHonorType } from '@/core/apis'; interface Payload { - group_id: number + group_id: number, + type?: WebHonorType } export class GetGroupHonorInfo extends BaseAction> { actionName = ActionName.GetGroupHonorInfo; protected async _handle(payload: Payload) { // console.log(await NTQQUserApi.getRobotUinRange()); - if(!payload.group_id){ + if (!payload.group_id) { throw '缺少参数group_id'; } - return await WebApi.getGroupHonorInfo(payload.group_id.toString()); + if (!payload.type) { + payload.type = WebHonorType.ALL; + } + return await WebApi.getGroupHonorInfo(payload.group_id.toString(), payload.type); } }