nestjs-telegraf/lib/interfaces/telegraf-options.interface.ts
Morbo 663ebf1a62
Update to Telegraf v4.0.0 (#212)
* feat(telegraf): update to v4.0.0

* chore(lock): update package-lock

* chore(deps): remove telegraf from dependencies

* chore(readme): update installation command

* chore(deps): add telegraf to dev dependencies
2021-01-11 16:17:32 +03:00

28 lines
791 B
TypeScript

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