mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
Update to Telegraf v4.0.0 (#212)
* feat(telegraf): update to v4.0.0 * chore(lock): update package-lock * chore(deps): remove telegraf from dependencies * chore(readme): update installation command * chore(deps): add telegraf to dev dependencies
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Cashtag handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=cashtag
|
||||
*/
|
||||
export const Cashtag = createMissedListenerDecorator<[string | string[]]>(
|
||||
'cashtag',
|
||||
);
|
||||
export const Cashtag = createListenerDecorator('cashtag');
|
||||
|
@@ -1,10 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Registers middleware for handling messages with email entity.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=telegraf-email
|
||||
*/
|
||||
export const Email = createMissedListenerDecorator<[string | string[]]>(
|
||||
'email',
|
||||
);
|
||||
export const Email = createListenerDecorator('email');
|
||||
|
@@ -1,10 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Hashtag handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=hashtag
|
||||
*/
|
||||
export const Hashtag = createMissedListenerDecorator<[string | string[]]>(
|
||||
'hashtag',
|
||||
);
|
||||
export const Hashtag = createListenerDecorator('hashtag');
|
||||
|
@@ -1,11 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { HearsTriggers } from 'telegraf/typings/composer';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Registers middleware for handling inline_query actions with regular expressions.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=inlinequery
|
||||
*/
|
||||
export const InlineQuery = createMissedListenerDecorator<
|
||||
[HearsTriggers<unknown>]
|
||||
>('inlineQuery');
|
||||
export const InlineQuery = createListenerDecorator('inlineQuery');
|
||||
|
@@ -1,10 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Mention handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=mention
|
||||
*/
|
||||
export const Mention = createMissedListenerDecorator<[string | string[]]>(
|
||||
'mention',
|
||||
);
|
||||
export const Mention = createListenerDecorator('mention');
|
||||
|
@@ -1,10 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Phone number handling.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=phone
|
||||
*/
|
||||
export const Phone = createMissedListenerDecorator<[string | string[]]>(
|
||||
'phone',
|
||||
);
|
||||
export const Phone = createListenerDecorator('phone');
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Handler for /settings command.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=settings
|
||||
*/
|
||||
export const Settings = createMissedListenerDecorator<[]>('settings');
|
||||
export const Settings = createListenerDecorator('settings');
|
||||
|
@@ -1,10 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Registers middleware for handling messages with text_link entity.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=telegraf-textlink
|
||||
*/
|
||||
export const TextLink = createMissedListenerDecorator<[string | string[]]>(
|
||||
'textLink',
|
||||
);
|
||||
export const TextLink = createListenerDecorator('textLink');
|
||||
|
@@ -1,10 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Registers middleware for handling messages with text_mention entity.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=telegraf-textlink
|
||||
*/
|
||||
export const TextMention = createMissedListenerDecorator<[string | string[]]>(
|
||||
'textMention',
|
||||
);
|
||||
export const TextMention = createListenerDecorator('textMention');
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { createMissedListenerDecorator } from '../../utils';
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
|
||||
/**
|
||||
* Registers middleware for handling messages with url entity.
|
||||
*
|
||||
* @see https://telegraf.js.org/#/?id=telegraf-url
|
||||
*/
|
||||
export const Url = createMissedListenerDecorator<[string | string[]]>('url');
|
||||
export const Url = createListenerDecorator('url');
|
||||
|
@@ -1,3 +1,6 @@
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
import { Scenes } from 'telegraf';
|
||||
|
||||
export const SceneEnter = createListenerDecorator('enter');
|
||||
export const SceneEnter = createListenerDecorator<Scenes.BaseScene<never>>(
|
||||
'enter',
|
||||
);
|
||||
|
@@ -1,3 +1,6 @@
|
||||
import { createListenerDecorator } from '../../utils';
|
||||
import { Scenes } from 'telegraf';
|
||||
|
||||
export const SceneLeave = createListenerDecorator('leave');
|
||||
export const SceneLeave = createListenerDecorator<Scenes.BaseScene<never>>(
|
||||
'leave',
|
||||
);
|
||||
|
Reference in New Issue
Block a user