mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
fix(): module work restored
This commit is contained in:
@@ -5,7 +5,7 @@ import { UPDATE_LISTENER_METADATA } from '../telegraf.constants';
|
||||
import { ListenerMetadata } from '../interfaces';
|
||||
|
||||
export function createUpdateListenerDecorator<Method extends UpdateMethods>(
|
||||
method: Method,
|
||||
method: unknown,
|
||||
) {
|
||||
return (
|
||||
...args: ComposerMethodArgs<Composer<never>, Method>
|
||||
|
@@ -7,7 +7,9 @@ export const TelegrafProvider = {
|
||||
provide: Telegraf,
|
||||
useFactory: (options: TelegrafModuleOptions) => {
|
||||
const telegraf = new Telegraf(options.token, options.options);
|
||||
telegraf.use(...options.middlewares);
|
||||
if (options.middlewares?.length > 0) {
|
||||
telegraf.use(...options.middlewares);
|
||||
}
|
||||
return telegraf;
|
||||
},
|
||||
inject: [TELEGRAF_MODULE_OPTIONS],
|
||||
|
Reference in New Issue
Block a user