import { Context as BaseContext } from 'telegraf'; import { Message } from 'typegram'; import { RegExpLike } from './generic-types'; import { MenuLike } from './menu-like'; import { SendMenuFunc } from './send-menu'; export interface Options { /** * Function which is used to send and update the menu. * * Defaults to `editMenuOnContext` */ readonly sendMenu?: SendMenuFunc; } export declare class MenuMiddleware { readonly rootTrigger: string | RegExpLike; readonly rootMenu: MenuLike; readonly options: Options; private readonly _sendMenu; private readonly _responder; constructor(rootTrigger: string | RegExpLike, rootMenu: MenuLike, options?: Options); /** * Send the root menu to the context. Shortcut for `replyMenuToContext(…)` * @param context Context where the root menu should be replied to * @example * const menuMiddleware = new MenuMiddleware('/', menuTemplate) * bot.command('start', async ctx => menuMiddleware.replyToContext(ctx)) */ replyToContext(context: Context, path?: string | RegExpLike): Promise; /** * The tree structure can be shown for debugging purposes. * You can take a look on the menu you created. */ tree(): string; middleware(): (context: Context, next: () => Promise) => void; }