import { Collection } from "@telegram.ts/collection"; import { TimeoutManager } from "./TimeoutManager"; import { AoiManager, type AoiManagerOptions } from "./AoiManager"; import { AoiExtension, type AoiClient, type CommandData } from "aoitelegram"; declare class AoiDB extends AoiExtension { name: string; description: string; version: string; database: AoiManager; timeoutManager: TimeoutManager; variablesCollect: Collection>; eventsCollect: Collection; /** * Creates an instance of AoiDB. * @param options - The options for the AoiManager. */ constructor(options?: AoiManagerOptions); /** * Registers a timeout command. * @param options - The command data. * @returns The instance of AoiDB. * @throws AoijsError if the 'id' or 'code' parameter is not specified. */ timeoutCommand(options: CommandData<{ id: string; }>): AoiDB; /** * Registers a variable create command. * @param options - The command data. * @returns The instance of AoiDB. * @throws AoijsError if the 'code' parameter is not specified. */ variableCreateCommand(options: CommandData): AoiDB; /** * Registers a variable update command. * @param options - The command data. * @returns The instance of AoiDB. * @throws AoijsError if the 'code' parameter is not specified. */ variableUpdateCommand(options: CommandData): AoiDB; /** * Registers a variable delete command. * @param options - The command data. * @returns The instance of AoiDB. * @throws AoijsError if the 'code' parameter is not specified. */ variableDeleteCommand(options: CommandData): AoiDB; /** * Sets the variables for the database. * @param variable - The variable data. * @param tables - The table(s) to store the variable data in. * @returns The instance of AoiDB. */ variables(variable: Record, tables?: string | string[]): AoiDB; /** * Initializes the database and loads functions. * @param telegram - The AoiClient instance. */ init(telegram: AoiClient): Promise; /** * Adds events to the event collection. * @param type - The type of event. * @param options - The command data. */ private addEvents; /** * Loads custom functions from the function directory. * @param telegram - The AoiClient instance. */ private loadFunction; } export { AoiDB };