mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-12-14 17:30:58 +03:00
feat(decorators): TelegrafPhone added
This commit is contained in:
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