mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat(decorators): TelegrafCashtag added
This commit is contained in:
@@ -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';
|
||||
|
12
lib/decorators/telegraf-cashtag.decorator.ts
Normal file
12
lib/decorators/telegraf-cashtag.decorator.ts
Normal 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 });
|
||||
}
|
Reference in New Issue
Block a user