mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-12-14 17:30:58 +03:00
feat(): multiple instances support
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
LaunchPollingOptions,
|
||||
LaunchWebhookOptions,
|
||||
} from 'telegraf/typings/telegraf';
|
||||
import { Middleware } from 'telegraf/typings/composer';
|
||||
|
||||
export interface TelegrafModuleOptions {
|
||||
token: string;
|
||||
@@ -12,6 +13,9 @@ export interface TelegrafModuleOptions {
|
||||
polling?: LaunchPollingOptions;
|
||||
webhook?: LaunchWebhookOptions;
|
||||
};
|
||||
botName?: string;
|
||||
include?: Function[];
|
||||
middlewares?: ReadonlyArray<Middleware<any>>;
|
||||
}
|
||||
|
||||
export interface TelegrafOptionsFactory {
|
||||
@@ -20,6 +24,7 @@ export interface TelegrafOptionsFactory {
|
||||
|
||||
export interface TelegrafModuleAsyncOptions
|
||||
extends Pick<ModuleMetadata, 'imports'> {
|
||||
botName?: string;
|
||||
useExisting?: Type<TelegrafOptionsFactory>;
|
||||
useClass?: Type<TelegrafOptionsFactory>;
|
||||
useFactory?: (
|
||||
|
||||
Reference in New Issue
Block a user