style: 标准化

This commit is contained in:
手瓜一十雪
2024-10-15 09:20:54 +08:00
parent 06e78f0550
commit 270514a50c
8 changed files with 12 additions and 22 deletions

View File

@@ -1,8 +1,6 @@
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
import { PacketMsgTextElement } from "@/core/packet/msg/element";
import { SendTextElement } from "@/core";
const SchemaData = {

View File

@@ -58,7 +58,7 @@ export default class GetRecord extends GetFileBase {
}
});
ffmpeg.on('error', (error) => {
ffmpeg.on('error', (error: Error) => {
reject(error);
});
});

View File

@@ -45,8 +45,7 @@ import { OB11GroupRecallNoticeEvent } from '@/onebot/event/notice/OB11GroupRecal
import { LRUCache } from '@/common/lru-cache';
import { NodeIKernelRecentContactListener } from '@/core/listeners/NodeIKernelRecentContactListener';
import { Native } from '@/native';
import { decodeMessage, decodeRecallGroup, Message, RecallGroup } from '@/core/packet/proto/old/Message';
import { OB11MessageDataType } from './types';
import { decodeMessage, decodeRecallGroup } from '@/core/packet/proto/old/Message';
//OneBot实现类
export class NapCatOneBot11Adapter {
@@ -85,7 +84,7 @@ export class NapCatOneBot11Adapter {
if (!this.nativeCore.inited) throw new Error('Native Not Init');
this.nativeCore.registerRecallCallback(async (hex: string) => {
try {
const data = decodeMessage(Buffer.from(hex, 'hex')) as any;
const data = decodeMessage(Buffer.from(hex, 'hex'));
//data.MsgHead.BodyInner.MsgType SubType
const bodyInner = data.msgHead?.bodyInner;
//context.logger.log("[appNative] Parse MsgType:" + bodyInner.msgType + " / SubType:" + bodyInner.subType);