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