mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-30 04:18:51 +03:00
feat: add GlobalUpdate decorator (#2)
This commit is contained in:
9
lib/decorators/core/global-update.decorator.ts
Normal file
9
lib/decorators/core/global-update.decorator.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { GLOBAL_UPDATE_METADATA } from '../../telegraf.constants';
|
||||
|
||||
/**
|
||||
* `@GlobalUpdate` decorator, it's like `@Update` decorator,
|
||||
* but processed before the scenes
|
||||
*/
|
||||
export const GlobalUpdate = (): ClassDecorator =>
|
||||
SetMetadata(GLOBAL_UPDATE_METADATA, true);
|
@@ -1,4 +1,5 @@
|
||||
export * from './update.decorator';
|
||||
export * from './global-update.decorator';
|
||||
export * from './scene.decorator';
|
||||
export * from './wizard.decorator';
|
||||
export * from './inject-bot.decorator';
|
||||
|
Reference in New Issue
Block a user