import { DataSourceOptions } from 'typeorm'; import { API } from './API'; import { CommandManager } from './commands'; import { BotContext } from './contexts'; import { DatabaseManager } from './database'; import { LogLevel } from './logger'; import { Middleware } from './middleware'; import { QuestionManager } from './question'; import { Updates } from './updates'; interface EvogramParams { token: string; database?: DataSourceOptions; /** * Flood control settings to prevent message overload. * Can be either: * - `true` to enable sequential processing, where the next message is processed only after the previous one completes. * - An object with a `delay` property to enforce a time-based delay between messages. */ floodControl?: boolean | { /** * Time delay in milliseconds between processing each message. Used to prevent flooding * based on timing if `floodControl` is an object. */ delay: number; }; logLevel?: LogLevel; dbConfig?: { messageLifetime?: number; maxMessages?: number; maxMessagesPayload?: number; }; } /** Represents the main client for the Evogram framework. */ export declare class Evogram { readonly params: EvogramParams; private static readonly TOKEN_REGEX; private logger; directory: string; api: API; middleware: Middleware; updates: Updates; database: DatabaseManager; question: QuestionManager; commands: CommandManager; bot: BotContext; /** * Creates an instance of the Evogram client. * @param token - The bot token used for authentication with the Telegram Bot API. * @throws {Error} Throws an error if the token is invalid. */ constructor(params: EvogramParams); init(): Promise; clone(): Evogram; } export {};