import TelegramBot from 'node-telegram-bot-api'; type TRole = "assistant" | "user" | "system"; type TMessage = { role: TRole; content: string; }; type TChatData = { chatId: number; text?: string; fromId?: number; messageId?: number; msg?: TelegramBot.Message; }; type TContext = { data: TChatData; userAccess: IUserAccess; prompt: IPromptManager; cmd: ICommandsManager; bot: IBotController; botInfo: TelegramBot.User; }; interface IUserAccess { canReply: boolean; fromChannel: boolean; fromSupergroup: boolean; } interface IBotController { telegram: TelegramBot; sendMessage(msg: TelegramBot.Message, response: string): Promise; isCommand(ctx: TContext): boolean; } interface IPromptManager { generate(ctx: TContext, content: string): Promise; } interface ICommandsManager { getCommand(ctx: TContext): string | undefined; saveCommand(ctx: TContext, cmd: string): void; hasCommand(ctx: TContext, cmd: string): boolean; resetCommand(ctx: TContext): void; canCommand(ctx: TContext): boolean; isCommand(cmd: string): boolean; command(ctx: TContext, cmd: ICommand): void; } interface ICommand { name: string; id: string; execute(ctx: TContext, cmd?: string): void; } type YesBotConfig = { commands: ICommand[]; callbacks: { onMessage?: (ctx: TContext) => void; onCallbackQuery?: (ctx: TContext, query: TelegramBot.CallbackQuery) => void; onUserAccess?: (botInfo: TelegramBot.User, msg: TelegramBot.Message, bot: TelegramBot, hashTags: { [key: string]: boolean; }) => Promise; onGeneratePrompt?: (ctx: TContext, content: string) => string; }; keys: { openai: string; telegram: string; }; openai: { model?: string; assistantId: string; threadId: string; }; }; declare class YesBot { config: YesBotConfig; botInfo: TelegramBot.User; bot: TelegramBot; constructor(config: YesBotConfig); start(): void; private init; private subscribe; private onMessage; private onCallbackQuery; } export { IBotController, ICommand, ICommandsManager, IPromptManager, IUserAccess, TChatData, TContext, TMessage, TRole, YesBot, YesBotConfig };