mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-25 23:44:39 +03:00
13 lines
338 B
TypeScript
13 lines
338 B
TypeScript
|
import { SetMetadata } from '@nestjs/common';
|
||
|
import { DECORATORS } from '../telegraf.constants';
|
||
|
|
||
|
/**
|
||
|
* Command handling.
|
||
|
* @param commands Commands
|
||
|
*
|
||
|
* https://telegraf.js.org/#/?id=command
|
||
|
*/
|
||
|
export function TelegrafCommand(commands: string | string[]): MethodDecorator {
|
||
|
return SetMetadata(DECORATORS.COMMAND, { commands });
|
||
|
}
|