feat(decorators): TelegrafHelp added

This commit is contained in:
Aleksandr Bukhalo
2020-03-19 16:44:05 +03:00
parent c0ffdeff34
commit fa3a7f5258
5 changed files with 47 additions and 17 deletions

View File

@@ -3,3 +3,4 @@ export * from './telegraf-on.decorator';
export * from './telegraf-hears.decorator';
export * from './telegraf-command.decorator';
export * from './telegraf-start.decorator';
export * from './telegraf-help.decorator';

View File

@@ -0,0 +1,11 @@
import { SetMetadata } from '@nestjs/common';
import { DECORATORS } from '../telegraf.constants';
/**
* Handler for /help command.
*
* https://telegraf.js.org/#/?id=help
*/
export function TelegrafHelp(): MethodDecorator {
return SetMetadata(DECORATORS.HELP, {});
}