/** * 日志模块 - 操作日志和命令日志管理 */ import { Context } from 'koishi'; import { BaseModule, ModuleMeta } from './base.module'; import { DataManager } from '../data'; import { Config } from '../../types'; export interface CommandLogRecord { id: string; timestamp: string; userId: string; username?: string; userAuthority?: number; guildId?: string; guildName?: string; channelId?: string; platform: string; command: string; args: string[]; options: Record; success: boolean; error?: string; executionTime: number; result?: string; messageId?: string; isPrivate: boolean; } export declare class LogModule extends BaseModule { readonly meta: ModuleMeta; private logPath; private commandLogPath; private commandStats; constructor(ctx: Context, dataManager: DataManager, config: Config); protected onInit(): Promise; private initCommandLogs; private readCommandLogs; private saveCommandLogs; private loadStats; private registerEventListeners; private logCommandExecution; private registerCommands; private registerOperationLogCommands; private registerCommandLogCommands; private filterLogs; private formatLogList; private formatStats; private cleanOldLogs; getCommandStats(): Map; getRecentLogs(limit?: number): Promise; getAllLogs(): Promise; }