mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat(decorators): TelegrafMention added
This commit is contained in:
12
lib/decorators/telegraf-mention.decorator.ts
Normal file
12
lib/decorators/telegraf-mention.decorator.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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 });
|
||||
}
|
Reference in New Issue
Block a user