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