feat(decorators): TelegrafCashtag added

This commit is contained in:
Aleksandr Bukhalo
2020-03-19 17:16:48 +03:00
parent 68690da83e
commit 7d3e266f0f
5 changed files with 40 additions and 0 deletions

View File

@@ -9,3 +9,4 @@ export * from './telegraf-entity.decorator';
export * from './telegraf-mention.decorator';
export * from './telegraf-phone.decorator';
export * from './telegraf-hashtag.decorator';
export * from './telegraf-cashtag.decorator';

View File

@@ -0,0 +1,12 @@
import { SetMetadata } from '@nestjs/common';
import { DECORATORS } from '../telegraf.constants';
/**
* Cashtag handling.
* @param cashtag Cashtag
*
* https://telegraf.js.org/#/?id=cashtag
*/
export function TelegrafCashtag(cashtag: string | string[]): MethodDecorator {
return SetMetadata(DECORATORS.CASHTAG, { cashtag });
}