invitron
Version:
A powerful Discord.js invite tracker with persistent storage, member analytics, vanity URL support, and comprehensive join monitoring system for Discord bots.
15 lines (14 loc) • 400 B
TypeScript
export declare class JSONStorage<T = any> {
private filePath;
constructor(filePath?: string);
/**
* Loads the JSON data from the file.
* @returns Parsed data of type T. Returns an empty object if file is missing or invalid.
*/
load(): T;
/**
* Saves the provided data to the JSON file.
* @param data The data to persist
*/
save(data: T): void;
}