import { Context as BaseContext, Telegram } from 'telegraf'; import { ExtraReplyMessage, ExtraEditMessageText, ExtraEditMessageMedia } from 'telegraf/typings/telegram-types'; import { Message } from 'typegram'; import { MenuLike } from './menu-like'; /** * Generic Method which is able to send a menu to a context (given a path where it is) */ export declare type SendMenuFunc = (menu: MenuLike, context: Context, path: string) => Promise; /** * Method which is able to send a menu to a chat. * Generated via `generateSendMenuToChatFunction`. */ export declare type SendMenuToChatFunction = (chatId: string | number, context: Context, extra?: Readonly) => Promise; /** * Method which is able to edit a message in a chat into a menu. * Generated via `generateEditMessageIntoMenuFunction`. */ export declare type EditMessageIntoMenuFunction = (chatId: number | string, messageId: number, context: Context, extra?: Readonly) => Promise; /** * Reply a menu to a context as a new message * @param menu menu to be shown * @param context current Telegraf context to reply the menu to it * @param path path of the menu * @param extra optional additional Telegraf Extra options */ export declare function replyMenuToContext(menu: MenuLike, context: Context, path: string, extra?: Readonly): Promise; /** * Edit the context into the menu. If thats not possible the current message is deleted and a new message is replied * @param menu menu to be shown * @param context current Telegraf context to edit the menu into * @param path path of the menu * @param extra optional additional Telegraf Extra options */ export declare function editMenuOnContext(menu: MenuLike, context: Context, path: string, extra?: Readonly): Promise; /** * Delete the message on the context. * If thats not possible the reply markup (keyboard) is removed. The user can not press any buttons on that old message. * @param context context of the message to be deleted */ export declare function deleteMenuFromContext(context: Context): Promise; /** * Deletes to menu of the current context and replies a new one ensuring the menu is at the end of the chat. * @param menu menu to be shown * @param context current Telegraf context to send the menu to * @param path path of the menu * @param extra optional additional Telegraf Extra options */ export declare function resendMenuToContext(menu: MenuLike, context: Context, path: string, extra?: Readonly): Promise; /** * Generate a function to send the menu towards a chat from external events * @param telegram The Telegram object to do the API calls with later on * @param menu menu to be shown * @param path path of the menu */ export declare function generateSendMenuToChatFunction(telegram: Readonly, menu: MenuLike, path: string): SendMenuToChatFunction; /** * Edit the message into the the menu. * This fails when the current message is not compatible with the menu (you cant edit a media message into a text message and vice versa) * @param telegram The Telegram object to do the API calls with later on * @param menu menu to be shown * @param path path of the menu */ export declare function generateEditMessageIntoMenuFunction(telegram: Readonly, menu: MenuLike, path: string): EditMessageIntoMenuFunction;