nestjs-telegraf/lib/decorators/telegraf-mention.decorator.ts
2020-03-19 16:58:27 +03:00

13 lines
338 B
TypeScript

import { SetMetadata } from '@nestjs/common';
import { DECORATORS } from '../telegraf.constants';
/**
* Mention handling.
* @param username Username
*
* https://telegraf.js.org/#/?id=mention
*/
export function TelegrafMention(username: string | string[]): MethodDecorator {
return SetMetadata(DECORATORS.MENTION, { username });
}