refactor: Action

This commit is contained in:
手瓜一十雪 committed 2024-11-19 12:49:51 +08:00
1 parent 86db0e827c
commit fa6a8816f8
88 files changed
+206 -221

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
import BaseAction from '../BaseAction';
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ChatType, Peer } from '@/core/entities';
import { ActionName } from '../types';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
@@ -16,7 +16,7 @@ const SchemaData = {
type Payload = FromSchema<typeof SchemaData>;
class ForwardSingleMsg extends BaseAction<Payload, null> {
class ForwardSingleMsg extends OneBotAction<Payload, null> {
protected async getTargetPeer(payload: Payload): Promise<Peer> {
if (payload.user_id) {
const peerUid = await this.core.apis.UserApi.getUidByUinV2(payload.user_id.toString());