mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-24 23:14:39 +03:00
663ebf1a62
* 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
28 lines
791 B
TypeScript
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[];
|
|
}
|