diff --git a/.gitignore b/.gitignore index 942e437..802b7a0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ config.yml subscribe.yml node_modules/ dist/ +*.zip diff --git a/index.js b/index.js index 0c87bcb..82544c8 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,7 @@ +const Promise = require('bluebird'); +Promise.config({ + cancellation: true, +}); + var App = require('./dist/App').default; new App(__dirname + "/config.yml"); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2559f0e..76de84d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "yaml": "^1.8.3" }, "devDependencies": { + "@types/bluebird-global": "^3.5.13", "@types/koa": "^2.13.4", "@types/koa-router": "^7.4.4", "@types/micromatch": "^4.0.2", @@ -106,6 +107,15 @@ "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", "dev": true }, + "node_modules/@types/bluebird-global": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@types/bluebird-global/-/bluebird-global-3.5.13.tgz", + "integrity": "sha512-jmq47VdRYy8KPjXDlJ6zO5Ie+l5j0X2fGdSbfCS3mGdM93MTy50dh/EfltIv/QD15hCYTY+0lm/C0Bou1tPYnQ==", + "dev": true, + "dependencies": { + "@types/bluebird": "*" + } + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmmirror.com/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -2330,6 +2340,15 @@ "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", "dev": true }, + "@types/bluebird-global": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@types/bluebird-global/-/bluebird-global-3.5.13.tgz", + "integrity": "sha512-jmq47VdRYy8KPjXDlJ6zO5Ie+l5j0X2fGdSbfCS3mGdM93MTy50dh/EfltIv/QD15hCYTY+0lm/C0Bou1tPYnQ==", + "dev": true, + "requires": { + "@types/bluebird": "*" + } + }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmmirror.com/@types/body-parser/-/body-parser-1.19.2.tgz", diff --git a/package.json b/package.json index 28e2fc8..1d8a24e 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "yaml": "^1.8.3" }, "devDependencies": { + "@types/bluebird-global": "^3.5.13", "@types/koa": "^2.13.4", "@types/koa-router": "^7.4.4", "@types/micromatch": "^4.0.2", diff --git a/src/robot/TelegramRobot.ts b/src/robot/TelegramRobot.ts index 3b29d6f..08f93a8 100644 --- a/src/robot/TelegramRobot.ts +++ b/src/robot/TelegramRobot.ts @@ -1,4 +1,3 @@ -import Bluebird from "bluebird"; import TelegramBot from "node-telegram-bot-api"; import App from "../App"; import { Robot } from "../RobotManager";