mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat(wip): rework listener decorators
This commit is contained in:
8
lib/decorators/core/update.decorator.ts
Normal file
8
lib/decorators/core/update.decorator.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { TELEGRAF_UPDATE } from '../../telegraf.constants';
|
||||
|
||||
/**
|
||||
* `@Update` decorator, it's like NestJS `@Controller` decorator,
|
||||
* but for Telegram Bot API updates.
|
||||
*/
|
||||
export const Update = (): ClassDecorator => SetMetadata(TELEGRAF_UPDATE, true);
|
Reference in New Issue
Block a user