feat(decorators): TelegrafPhone added

This commit is contained in:
Aleksandr Bukhalo
2020-03-19 17:02:37 +03:00
parent f5d9cf13b6
commit 225c931dbb
5 changed files with 42 additions and 0 deletions

View 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 });
}