export type TelegramBotClientOptions = { sendTimeoutMs?: number; pollRequestTimeoutMs?: number; }; export type TelegramIncomingMessage = { messageId: number; chatId: string; text: string; replyToMessageId?: number; }; type TelegramUpdate = { update_id?: unknown; message?: { message_id?: unknown; chat?: { id?: unknown; }; text?: unknown; reply_to_message?: { message_id?: unknown; }; }; }; export type TelegramFetch = typeof fetch; export declare class TelegramBotClient { private readonly botToken; private readonly chatId; private readonly fetchFn; private readonly options; private running; private abortController; private nextOffset; constructor(botToken: string, chatId: string, fetchFn?: TelegramFetch, options?: TelegramBotClientOptions); start(onMessage: (message: TelegramIncomingMessage) => void | Promise, onError?: (error: Error) => void): void; stop(): void; sendMessage(text: string, signal?: AbortSignal): Promise; private pollLoop; private sanitizeError; private call; } export declare function normalizeIncomingMessage(update: TelegramUpdate): TelegramIncomingMessage | undefined; export declare function trimTelegramText(text: string): string; export {};