mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat: TelegrafUse decorator added
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export * from './telegraf-use.decorator';
|
||||
export * from './telegraf-on.decorator';
|
||||
export * from './telegraf-hears.decorator';
|
||||
export * from './telegraf-start.decorator';
|
||||
|
11
lib/decorators/telegraf-use.decorator.ts
Normal file
11
lib/decorators/telegraf-use.decorator.ts
Normal 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, {});
|
||||
}
|
Reference in New Issue
Block a user