mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-24 15:04:38 +03:00
chore: remove legacy decorators
This commit is contained in:
parent
6dd856876c
commit
e999698fef
@ -17,11 +17,3 @@ export interface ActionOptions {
|
||||
export const Action = (triggers: TelegrafActionTriggers): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.ACTION, { triggers });
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers middleware for handling callback_data actions with regular expressions.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=action
|
||||
* @deprecated since v2, use Action decorator instead.
|
||||
*/
|
||||
export const TelegrafAction = Action;
|
||||
|
@ -15,11 +15,3 @@ export interface CashtagOptions {
|
||||
export const Cashtag = (cashtag: TelegrafCashtagCashtag): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.CASHTAG, { cashtag });
|
||||
};
|
||||
|
||||
/**
|
||||
* Cashtag handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=cashtag
|
||||
* @deprecated since v2, use Cashtag decorator instead.
|
||||
*/
|
||||
export const TelegrafCashtag = Cashtag;
|
||||
|
@ -15,11 +15,3 @@ export interface CommandOptions {
|
||||
export const Command = (commands: TelegrafCommandCommands): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.COMMAND, { commands });
|
||||
};
|
||||
|
||||
/**
|
||||
* Command handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=command
|
||||
* @deprecated since v2, use Command decorator instead.
|
||||
*/
|
||||
export const TelegrafCommand = Command;
|
||||
|
@ -20,11 +20,3 @@ export interface EntityOptions {
|
||||
export const Entity = (entity: TelegrafEntityEntity): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.ENTITY, { entity });
|
||||
};
|
||||
|
||||
/**
|
||||
* Entity handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=entity
|
||||
* @deprecated since v2, use Entity decorator instead.
|
||||
*/
|
||||
export const TelegrafEntity = Entity;
|
||||
|
@ -9,11 +9,3 @@ import { DECORATORS } from '../telegraf.constants';
|
||||
export const GameQuery = (): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.GAME_QUERY, {});
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers middleware for handling callback_data actions with game query.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=inlinequery
|
||||
* @deprecated since v2, use Action decorator instead.
|
||||
*/
|
||||
export const TelegrafGameQuery = GameQuery;
|
||||
|
@ -15,11 +15,3 @@ export interface HashtagOptions {
|
||||
export const Hashtag = (hashtag: TelegrafHashtagHashtag): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.HASHTAG, { hashtag });
|
||||
};
|
||||
|
||||
/**
|
||||
* Hashtag handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=hashtag
|
||||
* @deprecated since v2, use Hashtag decorator instead.
|
||||
*/
|
||||
export const TelegrafHashtag = Hashtag;
|
||||
|
@ -17,11 +17,3 @@ export interface HearsOptions {
|
||||
export const Hears = (triggers: TelegrafHearsTriggers): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.HEARS, { triggers: triggers });
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers middleware for handling text messages.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=hears
|
||||
* @deprecated since v2, use Hears decorator instead.
|
||||
*/
|
||||
export const TelegrafHears = Hears;
|
||||
|
@ -9,11 +9,3 @@ import { DECORATORS } from '../telegraf.constants';
|
||||
export const Help = (): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.HELP, {});
|
||||
};
|
||||
|
||||
/**
|
||||
* Handler for /help command.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=help
|
||||
* @deprecated since v2, use Help decorator instead.
|
||||
*/
|
||||
export const TelegrafHelp = Help;
|
||||
|
@ -17,11 +17,3 @@ export const InlineQuery = (
|
||||
): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.INLINE_QUERY, { triggers });
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers middleware for handling inline_query actions with regular expressions.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=inlinequery
|
||||
* @deprecated since v2, use InlineQuery decorator instead.
|
||||
*/
|
||||
export const TelegrafInlineQuery = InlineQuery;
|
||||
|
@ -15,11 +15,3 @@ export interface MentionOptions {
|
||||
export const Mention = (username: TelegrafMentionUsername): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.MENTION, { username });
|
||||
};
|
||||
|
||||
/**
|
||||
* Mention handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=mention
|
||||
* @deprecated since v2, use Mention decorator instead.
|
||||
*/
|
||||
export const TelegrafMention = Mention;
|
||||
|
@ -20,11 +20,3 @@ export interface OnOptions {
|
||||
export const On = (updateTypes: TelegrafOnUpdateTypes): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.ON, { updateTypes: updateTypes });
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers middleware for provided update type.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=on
|
||||
* @deprecated since v2, use On decorator instead.
|
||||
*/
|
||||
export const TelegrafOn = On;
|
||||
|
@ -15,11 +15,3 @@ export interface PhoneOptions {
|
||||
export const Phone = (phone: TelegrafPhonePhone): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.PHONE, { phone });
|
||||
};
|
||||
|
||||
/**
|
||||
* Phone number handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=phone
|
||||
* @deprecated since v2, use Phone decorator instead.
|
||||
*/
|
||||
export const TelegrafPhone = Phone;
|
||||
|
@ -9,11 +9,3 @@ import { DECORATORS } from '../telegraf.constants';
|
||||
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;
|
||||
|
@ -9,11 +9,3 @@ import { DECORATORS } from '../telegraf.constants';
|
||||
export const Start = (): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.START, {});
|
||||
};
|
||||
|
||||
/**
|
||||
* Handler for /start command.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=start
|
||||
* @deprecated since v2, use Start decorator instead.
|
||||
*/
|
||||
export const TelegrafStart = Start;
|
||||
|
@ -9,11 +9,3 @@ import { DECORATORS } from '../telegraf.constants';
|
||||
export const Use = (): MethodDecorator => {
|
||||
return SetMetadata(DECORATORS.USE, {});
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers a middleware.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=use
|
||||
* @deprecated since v2, use Use decorator instead.
|
||||
*/
|
||||
export const TelegrafUse = Use;
|
||||
|
Loading…
Reference in New Issue
Block a user