mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat(): add middleware support & refactor
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import { UpdateMethods } from '../telegraf.types';
|
||||
|
||||
export interface ListenerMetadata {
|
||||
method: UpdateMethods;
|
||||
method: string;
|
||||
args: unknown[];
|
||||
}
|
||||
|
@@ -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