feat: new Api GetGroupEssence&GetGroupHonorInfo

This commit is contained in:
手瓜一十雪
2024-05-15 21:12:10 +08:00
parent 6e5cfd827c
commit 9672f67a23
4 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import { GroupEssenceMsgRet, WebApi } from "@/ntqqapi/api";
import BaseAction from "../BaseAction";
import { ActionName } from "../types";
interface PayloadType {
group_id: number;
pages: number;
}
export class GetGroupEssence extends BaseAction<PayloadType, GroupEssenceMsgRet> {
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
protected async _handle(payload: PayloadType) {
const ret = await WebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
if (!ret) {
throw new Error('获取失败');
}
return ret;
}
}