mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
chore: debug
This commit is contained in:
parent
b921d5e734
commit
eac6d285ff
@ -31,7 +31,7 @@ class LimitedHashTable<K, V> {
|
|||||||
// console.log(this.valueToKey);
|
// console.log(this.valueToKey);
|
||||||
// console.log('---------------');
|
// console.log('---------------');
|
||||||
while (this.keyToValue.size > this.maxSize || this.valueToKey.size > this.maxSize) {
|
while (this.keyToValue.size > this.maxSize || this.valueToKey.size > this.maxSize) {
|
||||||
console.log(this.keyToValue.size > this.maxSize, this.valueToKey.size > this.maxSize);
|
//console.log(this.keyToValue.size > this.maxSize, this.valueToKey.size > this.maxSize);
|
||||||
const oldestKey = this.keyToValue.keys().next().value;
|
const oldestKey = this.keyToValue.keys().next().value;
|
||||||
this.valueToKey.delete(this.keyToValue.get(oldestKey)!);
|
this.valueToKey.delete(this.keyToValue.get(oldestKey)!);
|
||||||
this.keyToValue.delete(oldestKey);
|
this.keyToValue.delete(oldestKey);
|
||||||
|
@ -12,7 +12,6 @@ import { log, logDebug, logError } from '@/common/utils/log';
|
|||||||
import { GeneralCallResult, napCatCore, OnRichMediaDownloadCompleteParams } from '@/core';
|
import { GeneralCallResult, napCatCore, OnRichMediaDownloadCompleteParams } from '@/core';
|
||||||
import { calculateFileMD5 } from '@/common/utils/file';
|
import { calculateFileMD5 } from '@/common/utils/file';
|
||||||
import * as fileType from 'file-type';
|
import * as fileType from 'file-type';
|
||||||
import { MsgListener } from '@/core/listeners';
|
|
||||||
import imageSize from 'image-size';
|
import imageSize from 'image-size';
|
||||||
import { ISizeCalculationResult } from 'image-size/dist/types/interface';
|
import { ISizeCalculationResult } from 'image-size/dist/types/interface';
|
||||||
import { sessionConfig } from '@/core/sessionConfig';
|
import { sessionConfig } from '@/core/sessionConfig';
|
||||||
@ -149,7 +148,6 @@ export class NTQQFileApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static async getImageUrl(element: { originImageUrl: any; md5HexStr?: any; fileUuid: any; }, isPrivateImage: boolean) {
|
static async getImageUrl(element: { originImageUrl: any; md5HexStr?: any; fileUuid: any; }, isPrivateImage: boolean) {
|
||||||
|
|
||||||
if (!element) {
|
if (!element) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ export class NTQQSystemApi {
|
|||||||
static async BootMiniApp(appfile: string, params: string) {
|
static async BootMiniApp(appfile: string, params: string) {
|
||||||
await napCatCore.session.getNodeMiscService().setMiniAppVersion('2.16.4');
|
await napCatCore.session.getNodeMiscService().setMiniAppVersion('2.16.4');
|
||||||
let c = await napCatCore.session.getNodeMiscService().getMiniAppPath();
|
let c = await napCatCore.session.getNodeMiscService().getMiniAppPath();
|
||||||
console.log(c);
|
|
||||||
return napCatCore.session.getNodeMiscService().startNewMiniApp(appfile, params);
|
return napCatCore.session.getNodeMiscService().startNewMiniApp(appfile, params);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -248,7 +248,28 @@ export class SendMsgElementConstructor {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// NodeIQQNTWrapperSession sendMsg [
|
||||||
|
// "0",
|
||||||
|
// {
|
||||||
|
// "peerUid": "u_e_RIxgTs2NaJ68h0PwOPSg",
|
||||||
|
// "chatType": 1,
|
||||||
|
// "guildId": ""
|
||||||
|
// },
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "elementId": "0",
|
||||||
|
// "elementType": 6,
|
||||||
|
// "faceElement": {
|
||||||
|
// "faceIndex": 0,
|
||||||
|
// "faceType": 5,
|
||||||
|
// "msgType": 0,
|
||||||
|
// "pokeType": 1,
|
||||||
|
// "pokeStrength": 0
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// {}
|
||||||
|
// ]
|
||||||
static face(faceId: number): SendFaceElement {
|
static face(faceId: number): SendFaceElement {
|
||||||
// 从face_config.json中获取表情名称
|
// 从face_config.json中获取表情名称
|
||||||
const sysFaces = faceConfig.sysface;
|
const sysFaces = faceConfig.sysface;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user