nestjs-telegraf/lib/decorators/telegraf-phone.decorator.ts

13 lines
332 B
TypeScript
Raw Normal View History

2020-03-19 17:02:37 +03:00
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 });
}