Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
norbornen committed Aug 18, 2020
1 parent abc95ca commit d636317
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 153 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
},
"dependencies": {
"@typegoose/typegoose": "^6.4.0",
"@types/ejs": "^3.0.1",
"@types/ejs": "^3.0.4",
"@types/mongoose": "^5.7.8",
"@types/node": "^13.9.5",
"@types/qs": "^6.9.1",
"@types/ramda": "^0.27.0",
"@types/node": "^14.6.0",
"@types/qs": "^6.9.4",
"@types/ramda": "^0.27.14",
"axios": "^0.19.2",
"ejs": "^3.0.1",
"ejs": "^3.1.5",
"mongoose": "^5.9.6",
"p-settle": "^4.0.0",
"p-settle": "^4.1.1",
"proxy-agent": "^3.1.1",
"qs": "^6.9.3",
"ramda": "^0.27.0",
"qs": "^6.9.4",
"ramda": "^0.27.1",
"reflect-metadata": "^0.1.13",
"telegraf": "^3.36.0",
"telegraf": "^3.38.0",
"ts-money": "^0.4.6",
"ts-node": "^8.8.1",
"tslint": "^6.1.0",
"ts-node": "^8.10.2",
"tslint": "^6.1.3",
"typescript": "^3.8.3"
}
}
7 changes: 4 additions & 3 deletions src/providers/notification/Telegram.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { isNil, isEmpty } from 'ramda';
import * as ejs from 'ejs';
import Telegraf, { ContextMessageUpdate, TelegrafOptions } from 'telegraf';
import { Telegraf, Context } from 'telegraf';
import { TelegrafOptions } from 'telegraf/typings/telegraf';
import { ExtraEditMessage } from 'telegraf/typings/telegram-types';
import ProxyAgent from 'proxy-agent';
import AbstractNotifcationProvider, { CtorArgs } from './abstract';


class TelegramNotifcationProvider extends AbstractNotifcationProvider {
private _bot!: Telegraf<ContextMessageUpdate>;
private _bot!: Telegraf<Context>;
private compiled!: ejs.AsyncTemplateFunction;
private readonly sendMessageExtraParameters: ExtraEditMessage = { parse_mode: 'HTML', disable_web_page_preview: true };

Expand All @@ -16,7 +17,7 @@ class TelegramNotifcationProvider extends AbstractNotifcationProvider {
this.compiled = ejs.compile(this.template!.html, { async: true });
}

private get bot(): Telegraf<ContextMessageUpdate> {
private get bot(): Telegraf<Context> {
if (!this._bot) {
const telegrafOptions: TelegrafOptions = {};
if ('proxy' in this.connection && !isNil(this.connection.proxy) && !isEmpty(this.connection.proxy)) {
Expand Down
Loading

0 comments on commit d636317

Please sign in to comment.