feat(decorators): TelegrafGameQuery added

This commit is contained in:
Aleksandr Bukhalo
2020-03-19 17:28:56 +03:00
parent f65905ed0d
commit a2eb619e6b
5 changed files with 30 additions and 0 deletions

View File

@@ -12,3 +12,4 @@ export * from './telegraf-hashtag.decorator';
export * from './telegraf-cashtag.decorator';
export * from './telegraf-action.decorator';
export * from './telegraf-inline-query.decorator';
export * from './telegraf-game-query.decorator';

View File

@@ -0,0 +1,11 @@
import { SetMetadata } from '@nestjs/common';
import { DECORATORS } from '../telegraf.constants';
/**
* Registers middleware for handling callback_data actions with game query.
*
* https://telegraf.js.org/#/?id=inlinequery
*/
export function TelegrafGameQuery(): MethodDecorator {
return SetMetadata(DECORATORS.GAME_QUERY, {});
}