mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat(decorators): TelegrafPhone added
This commit is contained in:
@@ -4,4 +4,7 @@ export * from './telegraf-hears.decorator';
|
||||
export * from './telegraf-command.decorator';
|
||||
export * from './telegraf-start.decorator';
|
||||
export * from './telegraf-help.decorator';
|
||||
export * from './telegraf-settings.decorator';
|
||||
export * from './telegraf-entity.decorator';
|
||||
export * from './telegraf-mention.decorator';
|
||||
export * from './telegraf-phone.decorator';
|
||||
|
12
lib/decorators/telegraf-phone.decorator.ts
Normal file
12
lib/decorators/telegraf-phone.decorator.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { DECORATORS } from '../telegraf.constants';
|
||||
|
||||
/**
|
||||
* Phone number handling.
|
||||
* @param phone Phone number
|
||||
*
|
||||
* https://telegraf.js.org/#/?id=phone
|
||||
*/
|
||||
export function TelegrafPhone(phone: string | string[]): MethodDecorator {
|
||||
return SetMetadata(DECORATORS.PHONE, { phone });
|
||||
}
|
Reference in New Issue
Block a user