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

13 lines
338 B
TypeScript
Raw Normal View History

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