mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-10-09 14:54:24 +03:00
feat: remove "Telegraf" prefix from decorator names
This commit is contained in:
19
lib/decorators/settings.decorator.ts
Normal file
19
lib/decorators/settings.decorator.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { DECORATORS } from '../telegraf.constants';
|
||||
|
||||
/**
|
||||
* Handler for /settings command.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=settings
|
||||
*/
|
||||
export const Settings = (): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.SETTINGS, {});
|
||||
};
|
||||
|
||||
/**
|
||||
* Handler for /settings command.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=settings
|
||||
* @deprecated since v2, use Settings decorator instead.
|
||||
*/
|
||||
export const TelegrafSettings = Settings;
|
Reference in New Issue
Block a user