mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
build: 1.3.5-beta36
get_group_system_msg 未标准化
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
import { NTQQGroupApi } from '@/core';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQMsgApi } from '@/core/apis/msg';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
|
||||
const SchemaData = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
group_id: { type: 'number' }
|
||||
},
|
||||
} as const satisfies JSONSchema;
|
||||
|
||||
export class GetGroupSystemMsg extends BaseAction<void, void> {
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
|
||||
export class GetGroupSystemMsg extends BaseAction<void, any> {
|
||||
actionName = ActionName.GetGroupSystemMsg;
|
||||
protected async _handle(payload: void) {
|
||||
|
||||
// 默认10条 该api未完整实现 包括响应数据规范化 类型规范化
|
||||
return await NTQQGroupApi.getSingleScreenNotifies(10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ import { SendGroupNotice } from './go-cqhttp/SendGroupNotice';
|
||||
import { Reboot, RebootNormol } from './system/Reboot';
|
||||
import { GetGroupHonorInfo } from './go-cqhttp/GetGroupHonorInfo';
|
||||
import { GoCQHTTHandleQuickAction } from './go-cqhttp/QuickAction';
|
||||
import { GetGroupSystemMsg } from './group/GetGroupSystemMsg';
|
||||
|
||||
export const actionHandlers = [
|
||||
new RebootNormol(),
|
||||
@@ -118,7 +119,8 @@ export const actionHandlers = [
|
||||
new GoCQHTTPGetGroupMsgHistory(),
|
||||
new GoCQHTTGetForwardMsgAction(),
|
||||
new GetFriendMsgHistory(),
|
||||
new GoCQHTTHandleQuickAction()
|
||||
new GoCQHTTHandleQuickAction(),
|
||||
new GetGroupSystemMsg()
|
||||
];
|
||||
|
||||
function initActionMap() {
|
||||
|
||||
Reference in New Issue
Block a user