mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix
This commit is contained in:
2
src/core
2
src/core
Submodule src/core updated: 2d930457e2...e5a4b1b941
@@ -4,17 +4,21 @@ import { OB11Constructor } from '../../constructor';
|
|||||||
import BaseAction from '../BaseAction';
|
import BaseAction from '../BaseAction';
|
||||||
import { ActionName } from '../types';
|
import { ActionName } from '../types';
|
||||||
import { NTQQMsgApi } from '@/core/apis/msg';
|
import { NTQQMsgApi } from '@/core/apis/msg';
|
||||||
import { WebApi } from '@/core/apis/webapi';
|
import { GroupEssenceMsgRet, WebApi } from '@/core/apis/webapi';
|
||||||
|
|
||||||
interface PayloadType {
|
interface PayloadType {
|
||||||
group_id: number;
|
group_id: number;
|
||||||
pages: number;
|
pages: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetGroupEssence extends BaseAction<PayloadType, any> {
|
export class GetGroupEssence extends BaseAction<PayloadType, GroupEssenceMsgRet> {
|
||||||
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
|
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
|
||||||
|
|
||||||
protected async _handle(payload: PayloadType) {
|
protected async _handle(payload: PayloadType) {
|
||||||
return await WebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
|
let ret = await WebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
|
||||||
|
if (!ret) {
|
||||||
|
throw new Error('获取失败');
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user