export declare function readEnvVarFromFile(filePath: string, key: string): string | undefined; export interface CheckTokenResult { set: boolean; valid: boolean; username?: string; botId?: number; reason?: string; } export declare function checkTokenFromFile(filePath: string): Promise; export interface DiscoverChatResult { found: boolean; chats: DiscoveredChat[]; reason?: string; } export declare function discoverChatFromFile(filePath: string, opts?: { timeoutSec?: number; }): Promise; export interface BotIdentity { id: number; username?: string; firstName: string; } export declare function validateBotToken(token: string): Promise; interface UpdateEntry { message?: { chat?: { id?: number; type?: string; username?: string; first_name?: string; }; }; edited_message?: { chat?: { id?: number; type?: string; username?: string; first_name?: string; }; }; } export interface DiscoveredChat { chatId: number; type: string; username?: string; firstName?: string; } export declare function findChatIdInUpdates(updates: UpdateEntry[]): DiscoveredChat[]; export declare function fetchUpdates(token: string): Promise; export declare function pollForChats(token: string, opts?: { maxAttempts?: number; intervalMs?: number; }): Promise; export declare function runTelegramSetup(): Promise<{ envPath: string; bot: BotIdentity; chatId: number; }>; export {};