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