mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-02 00:30:25 +00:00
refactor: Action
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '../types';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
|
||||
@@ -17,7 +17,7 @@ const SchemaData = {
|
||||
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
|
||||
export class GetCookies extends BaseAction<Payload, Response> {
|
||||
export class GetCookies extends OneBotAction<Payload, Response> {
|
||||
actionName = ActionName.GetCookies;
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { OB11User } from '@/onebot';
|
||||
import { OB11Entities } from '@/onebot/entities';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '../types';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
|
||||
@@ -13,7 +13,7 @@ const SchemaData = {
|
||||
} as const satisfies JSONSchema;
|
||||
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
export default class GetFriendList extends BaseAction<Payload, OB11User[]> {
|
||||
export default class GetFriendList extends OneBotAction<Payload, OB11User[]> {
|
||||
actionName = ActionName.GetFriendList;
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '../types';
|
||||
import { AdapterConfigWrap } from '@/onebot/config/config';
|
||||
|
||||
@@ -12,7 +12,7 @@ const SchemaData = {
|
||||
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
|
||||
export default class GetRecentContact extends BaseAction<Payload, any> {
|
||||
export default class GetRecentContact extends OneBotAction<Payload, any> {
|
||||
actionName = ActionName.GetRecentContact;
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '../types';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
|
||||
@@ -13,7 +13,7 @@ const SchemaData = {
|
||||
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
|
||||
export default class SendLike extends BaseAction<Payload, null> {
|
||||
export default class SendLike extends OneBotAction<Payload, null> {
|
||||
actionName = ActionName.SendLike;
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '../types';
|
||||
|
||||
const SchemaData = {
|
||||
@@ -14,7 +14,7 @@ const SchemaData = {
|
||||
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
|
||||
export default class SetFriendAddRequest extends BaseAction<Payload, null> {
|
||||
export default class SetFriendAddRequest extends OneBotAction<Payload, null> {
|
||||
actionName = ActionName.SetFriendAddRequest;
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user