mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-12-14 17:30:58 +03:00
feat(): add middleware support & refactor
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
||||
import { Middleware, Context } from 'telegraf';
|
||||
import { TelegrafLaunchOption, TelegrafOption } from '../telegraf.types';
|
||||
|
||||
export interface TelegrafModuleOptions {
|
||||
export interface TelegrafModuleOptions<C extends Context = Context> {
|
||||
token: string;
|
||||
options?: TelegrafOption;
|
||||
launchOptions?: TelegrafLaunchOption;
|
||||
middlewares?: Middleware<C>[];
|
||||
}
|
||||
|
||||
export interface TelegrafOptionsFactory {
|
||||
|
||||
Reference in New Issue
Block a user