feat: TelegrafUse decorator added

This commit is contained in:
Aleksandr Bukhalo
2020-03-19 16:34:44 +03:00
parent 9fedcb964f
commit 6fddfd26f0
5 changed files with 31 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
export * from './telegraf-use.decorator';
export * from './telegraf-on.decorator';
export * from './telegraf-hears.decorator';
export * from './telegraf-start.decorator';

View File

@@ -0,0 +1,11 @@
import { SetMetadata } from '@nestjs/common';
import { DECORATORS } from '../telegraf.constants';
/**
* Registers a middleware.
*
* https://telegraf.js.org/#/?id=use
*/
export function TelegrafUse(): MethodDecorator {
return SetMetadata(DECORATORS.USE, {});
}