mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-23 14:42:59 +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:
parent
b16f0b9fa5
commit
663ebf1a62
@ -23,7 +23,7 @@ If you want to dive fully into NestJS Telegraf then don't waste your time in thi
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ npm i nestjs-telegraf
|
||||
$ npm i nestjs-telegraf telegraf
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
@ -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',
|
||||
);
|
||||
|
@ -1,21 +1,14 @@
|
||||
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
||||
import { Middleware, Context } from 'telegraf';
|
||||
import {
|
||||
TelegrafOptions,
|
||||
LaunchPollingOptions,
|
||||
LaunchWebhookOptions,
|
||||
} from 'telegraf/typings/telegraf';
|
||||
import { Middleware } from 'telegraf';
|
||||
import { LaunchOptions, TelegrafOptions } from '../types';
|
||||
|
||||
export interface TelegrafModuleOptions<C extends Context = Context> {
|
||||
export interface TelegrafModuleOptions {
|
||||
token: string;
|
||||
botName?: string;
|
||||
options?: TelegrafOptions;
|
||||
launchOptions?: {
|
||||
polling?: LaunchPollingOptions;
|
||||
webhook?: LaunchWebhookOptions;
|
||||
};
|
||||
launchOptions?: LaunchOptions;
|
||||
include?: Function[];
|
||||
middlewares?: ReadonlyArray<Middleware<C>>;
|
||||
middlewares?: ReadonlyArray<Middleware<any>>;
|
||||
}
|
||||
|
||||
export interface TelegrafOptionsFactory {
|
||||
|
@ -5,7 +5,7 @@ import { MetadataScanner } from '@nestjs/core/metadata-scanner';
|
||||
import { Module } from '@nestjs/core/injector/module';
|
||||
import { ParamMetadata } from '@nestjs/core/helpers/interfaces';
|
||||
import { ExternalContextCreator } from '@nestjs/core/helpers/external-context-creator';
|
||||
import { BaseScene, Composer, Context, Stage, Telegraf } from 'telegraf';
|
||||
import { Composer, Context, Scenes, Telegraf } from 'telegraf';
|
||||
|
||||
import { MetadataAccessorService } from './metadata-accessor.service';
|
||||
import {
|
||||
@ -23,7 +23,7 @@ export class ListenersExplorerService
|
||||
extends BaseExplorerService
|
||||
implements OnModuleInit {
|
||||
private readonly telegrafParamsFactory = new TelegrafParamsFactory();
|
||||
private readonly stage = new Stage([]);
|
||||
private readonly stage = new Scenes.Stage();
|
||||
private bot: Telegraf<any>;
|
||||
|
||||
constructor(
|
||||
@ -42,7 +42,7 @@ export class ListenersExplorerService
|
||||
}
|
||||
|
||||
onModuleInit(): void {
|
||||
this.bot = this.moduleRef.get<Telegraf<never>>(this.botName, {
|
||||
this.bot = this.moduleRef.get<Telegraf<any>>(this.botName, {
|
||||
strict: false,
|
||||
});
|
||||
this.bot.use(this.stage.middleware());
|
||||
@ -75,7 +75,7 @@ export class ListenersExplorerService
|
||||
const sceneId = this.metadataAccessor.getSceneMetadata(
|
||||
wrapper.instance.constructor,
|
||||
);
|
||||
const scene = new BaseScene(sceneId);
|
||||
const scene = new Scenes.BaseScene<any>(sceneId);
|
||||
this.stage.register(scene);
|
||||
|
||||
this.registerListeners(scene, wrapper);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BaseScene, Composer, Middleware } from 'telegraf';
|
||||
import { Composer, Middleware, Telegraf } from 'telegraf';
|
||||
|
||||
export type Filter<T extends any[], F> = T extends []
|
||||
? []
|
||||
@ -17,5 +17,5 @@ export type ComposerMethodArgs<
|
||||
U extends OnlyFunctionPropertyNames<T> = OnlyFunctionPropertyNames<T>
|
||||
> = Filter<Parameters<T[U]>, Middleware<never>>;
|
||||
|
||||
export type ComposerMethods = OnlyFunctionPropertyNames<Composer<never>>;
|
||||
export type SceneMethods = OnlyFunctionPropertyNames<BaseScene<never>>;
|
||||
export type LaunchOptions = Parameters<Telegraf['launch']>[0];
|
||||
export type TelegrafOptions = ConstructorParameters<typeof Telegraf>[1];
|
||||
|
@ -3,8 +3,8 @@ import { TelegrafModuleOptions } from '../interfaces';
|
||||
|
||||
export async function createBotFactory(
|
||||
options: TelegrafModuleOptions,
|
||||
): Promise<Telegraf<never>> {
|
||||
const bot = new Telegraf<never>(options.token, options.options);
|
||||
): Promise<Telegraf<any>> {
|
||||
const bot = new Telegraf<any>(options.token, options.options);
|
||||
|
||||
bot.use(...(options.middlewares ?? []));
|
||||
await bot.launch(options.launchOptions);
|
||||
|
@ -1,26 +1,14 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { BaseScene as Scene } from 'telegraf';
|
||||
import { ComposerMethodArgs, SceneMethods } from '../types';
|
||||
import { Composer } from 'telegraf';
|
||||
import { ComposerMethodArgs, OnlyFunctionPropertyNames } from '../types';
|
||||
import { LISTENER_METADATA } from '../telegraf.constants';
|
||||
import { ListenerMetadata } from '../interfaces';
|
||||
|
||||
export function createListenerDecorator<TMethod extends SceneMethods>(
|
||||
method: TMethod,
|
||||
) {
|
||||
return (
|
||||
...args: ComposerMethodArgs<Scene<never>, TMethod>
|
||||
): MethodDecorator => {
|
||||
return SetMetadata(LISTENER_METADATA, {
|
||||
method,
|
||||
args,
|
||||
} as ListenerMetadata);
|
||||
};
|
||||
}
|
||||
|
||||
export function createMissedListenerDecorator<TArgs extends any[]>(
|
||||
method: string,
|
||||
) {
|
||||
return (...args: TArgs): MethodDecorator => {
|
||||
export function createListenerDecorator<
|
||||
TComposer extends Composer<never>,
|
||||
TMethod extends OnlyFunctionPropertyNames<TComposer> = OnlyFunctionPropertyNames<TComposer>
|
||||
>(method: TMethod) {
|
||||
return (...args: ComposerMethodArgs<TComposer, TMethod>): MethodDecorator => {
|
||||
return SetMetadata(LISTENER_METADATA, {
|
||||
method,
|
||||
args,
|
||||
|
283
package-lock.json
generated
283
package-lock.json
generated
@ -13,9 +13,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"telegraf": "3.38.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "11.0.0",
|
||||
"@commitlint/config-angular": "11.0.0",
|
||||
@ -33,13 +30,15 @@
|
||||
"prettier": "2.2.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3",
|
||||
"telegraf": "*",
|
||||
"typedoc": "0.20.14",
|
||||
"typescript": "4.1.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^6.7.0 || ^7.0.0",
|
||||
"@nestjs/core": "^6.7.0 || ^7.0.0",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"telegraf": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@ -107,9 +106,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@commitlint/cli/node_modules/chalk": {
|
||||
@ -123,9 +119,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@commitlint/cli/node_modules/color-convert": {
|
||||
@ -242,9 +235,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@commitlint/format/node_modules/chalk": {
|
||||
@ -258,9 +248,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@commitlint/format/node_modules/color-convert": {
|
||||
@ -358,9 +345,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@commitlint/load/node_modules/chalk": {
|
||||
@ -374,9 +358,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@commitlint/load/node_modules/color-convert": {
|
||||
@ -858,6 +839,18 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.5"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
|
||||
@ -1061,9 +1054,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
@ -1230,12 +1220,7 @@
|
||||
"version": "3.8.2",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.2.tgz",
|
||||
"integrity": "sha512-FfApuSRgrR6G5s58casCBd9M2k+4ikuu4wbW6pJyYU7bd9zvFc9qf7vr5xmrZOhT9nn+8uwlH1oRR9jTnFoA3A==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/core-js"
|
||||
}
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@ -1500,15 +1485,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=5.0.0",
|
||||
"prettier": ">=1.13.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint-config-prettier": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-scope": {
|
||||
@ -1705,6 +1681,15 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/execa": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
|
||||
@ -1828,9 +1813,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/find-versions": {
|
||||
@ -1843,9 +1825,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/flat-cache": {
|
||||
@ -1925,9 +1904,6 @@
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/get-stream": {
|
||||
@ -2139,7 +2115,6 @@
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-4.3.7.tgz",
|
||||
"integrity": "sha512-0fQlcCDq/xypoyYSJvEuzbDPHFf8ZF9IXKJxlrnvxABTSzK1VPT2RKYQKrcgJ+YD39swgoB6sbzywUqFxUiqjw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"chalk": "^4.0.0",
|
||||
"ci-info": "^2.0.0",
|
||||
@ -2158,10 +2133,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/husky"
|
||||
}
|
||||
},
|
||||
"node_modules/husky/node_modules/ansi-styles": {
|
||||
@ -2724,9 +2695,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
@ -2952,9 +2920,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/meow/node_modules/type-fest": {
|
||||
@ -2964,9 +2929,6 @@
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
@ -3030,7 +2992,8 @@
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/minimist-options": {
|
||||
"version": "4.1.0",
|
||||
@ -3049,7 +3012,14 @@
|
||||
"node_modules/module-alias": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/module-alias/-/module-alias-2.2.2.tgz",
|
||||
"integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q=="
|
||||
"integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/natural-compare": {
|
||||
"version": "1.4.0",
|
||||
@ -3067,6 +3037,7 @@
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
}
|
||||
@ -3182,9 +3153,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/p-locate": {
|
||||
@ -3197,9 +3165,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/p-map": {
|
||||
@ -3214,6 +3179,15 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/p-timeout": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz",
|
||||
"integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
@ -3441,9 +3415,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/read-pkg-up/node_modules/find-up": {
|
||||
@ -3481,9 +3452,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/read-pkg-up/node_modules/p-locate": {
|
||||
@ -3696,26 +3664,13 @@
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sandwich-stream": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sandwich-stream/-/sandwich-stream-2.0.2.tgz",
|
||||
"integrity": "sha512-jLYV0DORrzY3xaz/S9ydJL6Iz7essZeAfnAavsJ+zsJGZ1MOnsS52yRjU3uF3pJa/lla7+wisp//fxOwOH8SKQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
@ -3745,9 +3700,6 @@
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/set-blocking": {
|
||||
@ -4164,42 +4116,39 @@
|
||||
}
|
||||
},
|
||||
"node_modules/telegraf": {
|
||||
"version": "3.38.0",
|
||||
"resolved": "https://registry.npmjs.org/telegraf/-/telegraf-3.38.0.tgz",
|
||||
"integrity": "sha512-va4VlrKWp64JrowFoZX/NPzzA6q38kvaIukVXOWFO1V+jR1G8+hCfgJy4TX8Z3rwLJzwaBEet1QhikHDRZWl3A==",
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.0.0.tgz",
|
||||
"integrity": "sha512-e4m9uJuAzzKe1gNUOn3z3NTLscfteV4GE4la5pfWFbm75OLWK3cp/qvz7Evy4oPpvc/bPlcDCyNgXnk4n2TBcw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"abort-controller": "^3.0.0",
|
||||
"debug": "^4.3.1",
|
||||
"minimist": "^1.2.5",
|
||||
"module-alias": "^2.2.2",
|
||||
"node-fetch": "^2.2.0",
|
||||
"sandwich-stream": "^2.0.1",
|
||||
"telegram-typings": "^3.6.0"
|
||||
"node-fetch": "^2.6.1",
|
||||
"p-timeout": "^4.1.0",
|
||||
"sandwich-stream": "^2.0.2",
|
||||
"typegram": "^3.1.4"
|
||||
},
|
||||
"bin": {
|
||||
"telegraf": "bin/telegraf"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/telegraf/node_modules/debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
|
||||
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.1"
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/telegraf/node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/telegram-typings": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/telegram-typings/-/telegram-typings-3.6.1.tgz",
|
||||
"integrity": "sha512-njVv1EAhIZnmQVLocZEADYUyqA1WIXuVcDYlsp+mXua/XB0pxx+PKtMSPeZ/EE4wPWTw9h/hA9ASTT6yQelkiw=="
|
||||
},
|
||||
"node_modules/text-extensions": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz",
|
||||
@ -4322,9 +4271,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.8.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "3.9.x || 4.0.x || 4.1.x"
|
||||
}
|
||||
},
|
||||
"node_modules/typedoc-default-themes": {
|
||||
@ -4336,6 +4282,12 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/typegram": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/typegram/-/typegram-3.1.4.tgz",
|
||||
"integrity": "sha512-AsYxLLynwBgeUJNU+3oSYNPSB3bwb/uyzrEPvrPwC0HXCYhW+otNV5q4T8Sb43SQSAP71hWC8EzBgDtlGGBx0A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
|
||||
@ -4605,9 +4557,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs/node_modules/p-locate": {
|
||||
@ -4642,9 +4591,6 @@
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -5297,6 +5243,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
|
||||
@ -5966,6 +5921,12 @@
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
||||
"dev": true
|
||||
},
|
||||
"event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
||||
"dev": true
|
||||
},
|
||||
"execa": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
|
||||
@ -7011,7 +6972,8 @@
|
||||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"dev": true
|
||||
},
|
||||
"minimist-options": {
|
||||
"version": "4.1.0",
|
||||
@ -7027,7 +6989,14 @@
|
||||
"module-alias": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/module-alias/-/module-alias-2.2.2.tgz",
|
||||
"integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q=="
|
||||
"integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
},
|
||||
"natural-compare": {
|
||||
"version": "1.4.0",
|
||||
@ -7044,7 +7013,8 @@
|
||||
"node-fetch": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
|
||||
"dev": true
|
||||
},
|
||||
"normalize-package-data": {
|
||||
"version": "3.0.0",
|
||||
@ -7153,6 +7123,12 @@
|
||||
"aggregate-error": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"p-timeout": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz",
|
||||
"integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==",
|
||||
"dev": true
|
||||
},
|
||||
"p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
@ -7528,7 +7504,8 @@
|
||||
"sandwich-stream": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sandwich-stream/-/sandwich-stream-2.0.2.tgz",
|
||||
"integrity": "sha512-jLYV0DORrzY3xaz/S9ydJL6Iz7essZeAfnAavsJ+zsJGZ1MOnsS52yRjU3uF3pJa/lla7+wisp//fxOwOH8SKQ=="
|
||||
"integrity": "sha512-jLYV0DORrzY3xaz/S9ydJL6Iz7essZeAfnAavsJ+zsJGZ1MOnsS52yRjU3uF3pJa/lla7+wisp//fxOwOH8SKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
@ -7900,38 +7877,32 @@
|
||||
}
|
||||
},
|
||||
"telegraf": {
|
||||
"version": "3.38.0",
|
||||
"resolved": "https://registry.npmjs.org/telegraf/-/telegraf-3.38.0.tgz",
|
||||
"integrity": "sha512-va4VlrKWp64JrowFoZX/NPzzA6q38kvaIukVXOWFO1V+jR1G8+hCfgJy4TX8Z3rwLJzwaBEet1QhikHDRZWl3A==",
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.0.0.tgz",
|
||||
"integrity": "sha512-e4m9uJuAzzKe1gNUOn3z3NTLscfteV4GE4la5pfWFbm75OLWK3cp/qvz7Evy4oPpvc/bPlcDCyNgXnk4n2TBcw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"abort-controller": "^3.0.0",
|
||||
"debug": "^4.3.1",
|
||||
"minimist": "^1.2.5",
|
||||
"module-alias": "^2.2.2",
|
||||
"node-fetch": "^2.2.0",
|
||||
"sandwich-stream": "^2.0.1",
|
||||
"telegram-typings": "^3.6.0"
|
||||
"node-fetch": "^2.6.1",
|
||||
"p-timeout": "^4.1.0",
|
||||
"sandwich-stream": "^2.0.2",
|
||||
"typegram": "^3.1.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
|
||||
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"telegram-typings": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/telegram-typings/-/telegram-typings-3.6.1.tgz",
|
||||
"integrity": "sha512-njVv1EAhIZnmQVLocZEADYUyqA1WIXuVcDYlsp+mXua/XB0pxx+PKtMSPeZ/EE4wPWTw9h/hA9ASTT6yQelkiw=="
|
||||
},
|
||||
"text-extensions": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz",
|
||||
@ -8035,6 +8006,12 @@
|
||||
"integrity": "sha512-6PEvV+/kWAJeUwEtrKgIsZQSbybW5DGCr6s2mMjHsDplpgN8iBHI52UbA+2C+c2TMCxBNMK9TMS6pdeIdwsLSw==",
|
||||
"dev": true
|
||||
},
|
||||
"typegram": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/typegram/-/typegram-3.1.4.tgz",
|
||||
"integrity": "sha512-AsYxLLynwBgeUJNU+3oSYNPSB3bwb/uyzrEPvrPwC0HXCYhW+otNV5q4T8Sb43SQSAP71hWC8EzBgDtlGGBx0A==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
|
||||
|
@ -43,9 +43,6 @@
|
||||
"test": "",
|
||||
"typedoc:build": "typedoc --tsconfig ./tsconfig.typedoc.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"telegraf": "3.38.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "11.0.0",
|
||||
"@commitlint/config-angular": "11.0.0",
|
||||
@ -63,13 +60,15 @@
|
||||
"prettier": "2.2.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3",
|
||||
"telegraf": "4.0.0",
|
||||
"typedoc": "0.20.14",
|
||||
"typescript": "4.1.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^6.7.0 || ^7.0.0",
|
||||
"@nestjs/core": "^6.7.0 || ^7.0.0",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"telegraf": "^4.0.0"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
@ -24,11 +24,11 @@
|
||||
"@nestjs/core": "7.6.5",
|
||||
"@nestjs/platform-express": "7.6.5",
|
||||
"dotenv": "8.2.0",
|
||||
"nestjs-telegraf": "*",
|
||||
"nestjs-telegraf": "2.0.0-beta.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3",
|
||||
"telegraf": "3.38.0"
|
||||
"telegraf": "4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
|
Loading…
Reference in New Issue
Block a user