mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat: add new @Update decorator
This commit is contained in:
@@ -14,3 +14,4 @@ export * from './telegraf-cashtag.decorator';
|
||||
export * from './telegraf-action.decorator';
|
||||
export * from './telegraf-inline-query.decorator';
|
||||
export * from './telegraf-game-query.decorator';
|
||||
export * from './update.decorator';
|
||||
|
8
lib/decorators/update.decorator.ts
Normal file
8
lib/decorators/update.decorator.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { DECORATORS } from '../telegraf.constants';
|
||||
|
||||
/**
|
||||
* `@Update` decorator, it's like NestJS `@Controller` decorator,
|
||||
* only for Telegram Bot API updates.
|
||||
*/
|
||||
export const Update = (): ClassDecorator => SetMetadata(DECORATORS.UPDATE, {});
|
Reference in New Issue
Block a user