mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
style: lint
This commit is contained in:
parent
02e39b5714
commit
b2075130d9
@ -234,7 +234,7 @@ export class NTEventWrapper {
|
|||||||
this.EventTask.get(ListenerMainName)?.get(ListenerSubName)?.set(id, eventCallback);
|
this.EventTask.get(ListenerMainName)?.get(ListenerSubName)?.set(id, eventCallback);
|
||||||
this.createListenerFunction(ListenerMainName);
|
this.createListenerFunction(ListenerMainName);
|
||||||
|
|
||||||
let eventResult = this.createEventFunction(serviceAndMethod)!(...(args));
|
const eventResult = this.createEventFunction(serviceAndMethod)!(...(args));
|
||||||
|
|
||||||
const eventRetHandle = (eventData: any) => {
|
const eventRetHandle = (eventData: any) => {
|
||||||
retEvent = eventData;
|
retEvent = eventData;
|
||||||
@ -252,7 +252,7 @@ export class NTEventWrapper {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
if (eventResult instanceof Promise) {
|
if (eventResult instanceof Promise) {
|
||||||
eventResult.then((eventResult: any) => {
|
eventResult.then((eventResult: any) => {
|
||||||
eventRetHandle(eventResult);
|
eventRetHandle(eventResult);
|
||||||
|
@ -290,5 +290,5 @@ function replyElementToText(replyElement: any, msg: RawMessage, recursiveLevel:
|
|||||||
?
|
?
|
||||||
rawMessageToText(recordMsgOrNull, recursiveLevel + 1) :
|
rawMessageToText(recordMsgOrNull, recursiveLevel + 1) :
|
||||||
`未找到消息记录 (MsgId = ${replyElement.sourceMsgIdInRecords})`
|
`未找到消息记录 (MsgId = ${replyElement.sourceMsgIdInRecords})`
|
||||||
}]`;
|
}]`;
|
||||||
}
|
}
|
@ -55,7 +55,7 @@ export async function getVideoInfo(filePath: string, logger: LogWrapper): Promis
|
|||||||
|
|
||||||
logger.log(`视频尺寸: ${videoStream.width}x${videoStream.height}`);
|
logger.log(`视频尺寸: ${videoStream.width}x${videoStream.height}`);
|
||||||
if (!videoStream.width || !metadata.format.format_name || !videoStream.height) {
|
if (!videoStream.width || !metadata.format.format_name || !videoStream.height) {
|
||||||
throw new Error('获取基础信息失败')
|
throw new Error('获取基础信息失败');
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
width: videoStream.width,
|
width: videoStream.width,
|
||||||
|
@ -300,18 +300,18 @@ export class NTQQFileApi {
|
|||||||
element.elementType === ElementType.FILE
|
element.elementType === ElementType.FILE
|
||||||
) {
|
) {
|
||||||
switch (element.elementType) {
|
switch (element.elementType) {
|
||||||
case ElementType.PIC:
|
case ElementType.PIC:
|
||||||
element.picElement!.sourcePath = elementResults[elementIndex];
|
element.picElement!.sourcePath = elementResults[elementIndex];
|
||||||
break;
|
break;
|
||||||
case ElementType.VIDEO:
|
case ElementType.VIDEO:
|
||||||
element.videoElement!.filePath = elementResults[elementIndex];
|
element.videoElement!.filePath = elementResults[elementIndex];
|
||||||
break;
|
break;
|
||||||
case ElementType.PTT:
|
case ElementType.PTT:
|
||||||
element.pttElement!.filePath = elementResults[elementIndex];
|
element.pttElement!.filePath = elementResults[elementIndex];
|
||||||
break;
|
break;
|
||||||
case ElementType.FILE:
|
case ElementType.FILE:
|
||||||
element.fileElement!.filePath = elementResults[elementIndex];
|
element.fileElement!.filePath = elementResults[elementIndex];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
elementIndex++;
|
elementIndex++;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export * from './entity';
|
export * from './data';
|
||||||
export * from './message';
|
export * from './message';
|
||||||
export * from './quick';
|
export * from './quick';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { OB11Sender } from './entity';
|
import { OB11Sender } from './data';
|
||||||
import { EventType } from '@/onebot/event/OneBotEvent';
|
import { EventType } from '@/onebot/event/OneBotEvent';
|
||||||
import { CustomMusicSignPostData, IdMusicSignPostData, PicSubType, RawMessage } from '@/core';
|
import { CustomMusicSignPostData, IdMusicSignPostData, PicSubType, RawMessage } from '@/core';
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ import { OB11BaseMetaEvent } from '../event/meta/OB11BaseMetaEvent';
|
|||||||
import { OB11BaseNoticeEvent } from '../event/notice/OB11BaseNoticeEvent';
|
import { OB11BaseNoticeEvent } from '../event/notice/OB11BaseNoticeEvent';
|
||||||
import { OB11Message } from './message';
|
import { OB11Message } from './message';
|
||||||
|
|
||||||
export type QuickActionEvent = OB11Message | OB11BaseMetaEvent | OB11BaseNoticeEvent
|
export type QuickActionEvent = OB11Message | OB11BaseMetaEvent | OB11BaseNoticeEvent;
|
||||||
export type PostEventType = OB11Message | OB11BaseMetaEvent | OB11BaseNoticeEvent
|
export type PostEventType = OB11Message | OB11BaseMetaEvent | OB11BaseNoticeEvent;
|
||||||
|
|
||||||
export interface QuickActionPrivateMessage {
|
export interface QuickActionPrivateMessage {
|
||||||
reply?: string;
|
reply?: string;
|
||||||
@ -33,4 +33,4 @@ export type QuickAction =
|
|||||||
QuickActionPrivateMessage
|
QuickActionPrivateMessage
|
||||||
& QuickActionGroupMessage
|
& QuickActionGroupMessage
|
||||||
& QuickActionFriendRequest
|
& QuickActionFriendRequest
|
||||||
& QuickActionGroupRequest
|
& QuickActionGroupRequest;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user