UNPKG

rashi-discord-bot-lib

Version:

🚀 Powerful Discord bot framework with built-in database, event handling, and utilities

49 lines • 1.32 kB
export interface FileLoaderOptions { extensions?: string[]; recursive?: boolean; blacklist?: string[]; requireDefault?: boolean; } export declare class FileLoader { private defaultOptions; constructor(); /** * Load all files from directory with given options */ loadFiles<T = any>(dirPath: string, options?: Partial<FileLoaderOptions>): Promise<{ files: T[]; count: number; errors: string[]; }>; /** * Load single file */ loadFile<T = any>(filePath: string, options?: Partial<FileLoaderOptions>): Promise<T | null>; /** * Alternative TypeScript file loading */ private loadTypeScriptFile; /** * Get all file paths from directory */ private getFilePaths; /** * Check if file has valid extension */ private isValidFile; /** * Get file name without extension from path */ private getFileNameFromPath; /** * Validate loaded module (override in subclasses) */ protected validateLoadedModule(mod: any): boolean; /** * Helpers */ static getFileExtension(filename: string): string; static pathExists(filePath: string): boolean; static getRelativePath(from: string, to: string): string; } //# sourceMappingURL=FileLoader.d.ts.map