import { ModuleMetadata, Type } from '@nestjs/common/interfaces'; import { Middleware, Context } from 'telegraf'; import { TelegrafOptions, LaunchPollingOptions, LaunchWebhookOptions, } from 'telegraf/typings/telegraf'; export interface TelegrafModuleOptions { token: string; name?: string; options?: TelegrafOptions; launchOptions?: { polling?: LaunchPollingOptions; webhook?: LaunchWebhookOptions; }; include?: Function[]; middlewares?: ReadonlyArray>; } export interface TelegrafOptionsFactory { createTelegrafOptions(): TelegrafModuleOptions; } export interface TelegrafModuleAsyncOptions extends Pick { name?: string; useExisting?: Type; useClass?: Type; useFactory?: ( ...args: any[] ) => Promise | TelegrafModuleOptions; inject?: any[]; }