koishi-plugin-chat-patch 2.1.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ export declare class ApiHandlers {
8
8
  private fileManager;
9
9
  private messageHandler;
10
10
  private logger;
11
+ private currentTempVideo;
11
12
  constructor(ctx: Context, config: Config, fileManager: FileManager, messageHandler: MessageHandler);
12
13
  registerApiHandlers(): void;
13
14
  private isFileUrl;
@@ -0,0 +1,25 @@
1
+ import { ChatData, MessageInfo } from './types';
2
+ import { Context } from 'koishi';
3
+ import { Config } from './config';
4
+ export declare class FileManager {
5
+ private ctx;
6
+ private config;
7
+ private dataFilePath;
8
+ private fileOperationLock;
9
+ private logger;
10
+ private utils;
11
+ private memoryCache;
12
+ private pendingMessages;
13
+ private writeTimer;
14
+ private readonly WRITE_DEBOUNCE_MS;
15
+ constructor(ctx: Context, config: Config);
16
+ private ensureDataDir;
17
+ readChatDataFromFile(): ChatData;
18
+ writeChatDataToFile(data: ChatData): void;
19
+ private scheduleWrite;
20
+ private flushPendingMessages;
21
+ cleanExcessMessages(data: ChatData): ChatData;
22
+ addMessageToFile(messageInfo: MessageInfo): Promise<void>;
23
+ dispose(): void;
24
+ private logInfo;
25
+ }