diff --git a/README.md b/README.md index a223e39c0..4d080e63f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A free and open source fully automated TF2 trading bot advertising on www.backpa ![License](https://img.shields.io/github/license/idinium96/tf2autobot) **TF2Autobot made by IdiNium** -[![profile](https://user-images.githubusercontent.com/47635037/100916111-4945eb80-3510-11eb-8036-86c032cb6627.png)](https://backpack.tf/profiles/76561198013127982) +[![profile](https://user-images.githubusercontent.com/47635037/112201149-edcc7480-8c4a-11eb-9756-fcf1509a74d0.png)](https://backpack.tf/profiles/76561198013127982) Before you install the bot, there are a few things you will need: @@ -45,7 +45,7 @@ If you run into trouble when running the bot, make sure to head to [Common Error Join the [TF2Autobot Discord server](https://discord.gg/D2GNnp7tv8) and head over to [`#๐roles`](https://discordapp.com/channels/664971400678998016/719391430669500447/771188962550611988) channel and react to the first message to get notified whenever an update has been released! -
+ \*\*There are also giveaways held every Thursday, 8 AM - 8 PM (12 hours) Malaysia time! diff --git a/package-lock.json b/package-lock.json index d6944d30f..139548a8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1809,9 +1809,9 @@ "dev": true }, "@types/cheerio": { - "version": "0.22.27", - "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.27.tgz", - "integrity": "sha512-UpmYZewEWNEE6Ya24RzAQ2X2OYwz32AaLyzYinpM8qqFGRyYufqKSvxPjjZkvS+h16bajfXl7VojrAxWzG/+mA==", + "version": "0.22.28", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.28.tgz", + "integrity": "sha512-ehUMGSW5IeDxJjbru4awKYMlKGmo1wSSGUVqXtYwlgmUM8X1a0PZttEIm6yEY7vHsY/hh6iPnklF213G0UColw==", "dev": true, "requires": { "@types/node": "*" @@ -2038,13 +2038,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.18.0.tgz", - "integrity": "sha512-Lzkc/2+7EoH7+NjIWLS2lVuKKqbEmJhtXe3rmfA8cyiKnZm3IfLf51irnBcmow8Q/AptVV0XBZmBJKuUJTe6cQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz", + "integrity": "sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.18.0", - "@typescript-eslint/scope-manager": "4.18.0", + "@typescript-eslint/experimental-utils": "4.19.0", + "@typescript-eslint/scope-manager": "4.19.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -2054,43 +2054,43 @@ }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.18.0.tgz", - "integrity": "sha512-92h723Kblt9JcT2RRY3QS2xefFKar4ZQFVs3GityOKWQYgtajxt/tuXIzL7sVCUlM1hgreiV5gkGYyBpdOwO6A==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz", + "integrity": "sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", + "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/typescript-estree": "4.19.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/scope-manager": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.18.0.tgz", - "integrity": "sha512-olX4yN6rvHR2eyFOcb6E4vmhDPsfdMyfQ3qR+oQNkAv8emKKlfxTWUXU5Mqxs2Fwe3Pf1BoPvrwZtwngxDzYzQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz", + "integrity": "sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0" + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.0" } }, "@typescript-eslint/types": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.18.0.tgz", - "integrity": "sha512-/BRociARpj5E+9yQ7cwCF/SNOWwXJ3qhjurMuK2hIFUbr9vTuDeu476Zpu+ptxY2kSxUHDGLLKy+qGq2sOg37A==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.19.0.tgz", + "integrity": "sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.18.0.tgz", - "integrity": "sha512-wt4xvF6vvJI7epz+rEqxmoNQ4ZADArGQO9gDU+cM0U5fdVv7N+IAuVoVAoZSOZxzGHBfvE3XQMLdy+scsqFfeg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz", + "integrity": "sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -2099,12 +2099,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.18.0.tgz", - "integrity": "sha512-Q9t90JCvfYaN0OfFUgaLqByOfz8yPeTAdotn/XYNm5q9eHax90gzdb+RJ6E9T5s97Kv/UHWKERTmqA0jTKAEHw==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz", + "integrity": "sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", + "@typescript-eslint/types": "4.19.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -2115,9 +2115,9 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -2140,41 +2140,41 @@ } }, "@typescript-eslint/parser": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.18.0.tgz", - "integrity": "sha512-W3z5S0ZbecwX3PhJEAnq4mnjK5JJXvXUDBYIYGoweCyWyuvAKfGHvzmpUzgB5L4cRBb+cTu9U/ro66dx7dIimA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.19.0.tgz", + "integrity": "sha512-/uabZjo2ZZhm66rdAu21HA8nQebl3lAIDcybUoOxoI7VbZBYavLIwtOOmykKCJy+Xq6Vw6ugkiwn8Js7D6wieA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", + "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/typescript-estree": "4.19.0", "debug": "^4.1.1" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.18.0.tgz", - "integrity": "sha512-olX4yN6rvHR2eyFOcb6E4vmhDPsfdMyfQ3qR+oQNkAv8emKKlfxTWUXU5Mqxs2Fwe3Pf1BoPvrwZtwngxDzYzQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz", + "integrity": "sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0" + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.0" } }, "@typescript-eslint/types": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.18.0.tgz", - "integrity": "sha512-/BRociARpj5E+9yQ7cwCF/SNOWwXJ3qhjurMuK2hIFUbr9vTuDeu476Zpu+ptxY2kSxUHDGLLKy+qGq2sOg37A==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.19.0.tgz", + "integrity": "sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.18.0.tgz", - "integrity": "sha512-wt4xvF6vvJI7epz+rEqxmoNQ4ZADArGQO9gDU+cM0U5fdVv7N+IAuVoVAoZSOZxzGHBfvE3XQMLdy+scsqFfeg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz", + "integrity": "sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -2183,12 +2183,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.18.0.tgz", - "integrity": "sha512-Q9t90JCvfYaN0OfFUgaLqByOfz8yPeTAdotn/XYNm5q9eHax90gzdb+RJ6E9T5s97Kv/UHWKERTmqA0jTKAEHw==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz", + "integrity": "sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", + "@typescript-eslint/types": "4.19.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -2199,9 +2199,9 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -3009,9 +3009,9 @@ } }, "bptf-listings-2": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/bptf-listings-2/-/bptf-listings-2-1.3.5.tgz", - "integrity": "sha512-fS7RnevnFXAftFrXVM2cF+vJHCWq4YyTo/kMAsFipTDivcvTKyAHwK5VZWnn2VhGlUs04AYY+KZv5NBeGq1f9w==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/bptf-listings-2/-/bptf-listings-2-1.3.6.tgz", + "integrity": "sha512-zL41l3KSYOCwd65khzZnjEUA3OfJME+4R6ZbS8eiXfXmw6JnJfjYijmxvdU4ay2FS5bdDHpuSpjKln+r60PL9A==", "requires": { "async": "^3.2.0", "events": "^3.2.0", @@ -10895,9 +10895,9 @@ } }, "tf2-schema-2": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/tf2-schema-2/-/tf2-schema-2-1.5.0.tgz", - "integrity": "sha512-sNhOVEZ3nYTY3QbIhxwTbAd2vgeYK1l65HdfbCk18oUjoyQe9XQYO7Bh1ywzCWZ4GHTS2c7tTBXDEDDrzwSk6A==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/tf2-schema-2/-/tf2-schema-2-1.5.1.tgz", + "integrity": "sha512-CFY1Mtrg9hER3sDT7toTyUNG/mulI9gQAA4lWo81quwkhhLWywKnMlPepwAu+/9xuehkToRsib3j1eitO5PuKQ==", "requires": { "async": "^3.2.0", "events": "^3.2.0", @@ -10908,15 +10908,6 @@ "vdf": "0.0.2" }, "dependencies": { - "tf2-sku-2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tf2-sku-2/-/tf2-sku-2-1.1.1.tgz", - "integrity": "sha512-mQexJmjcogSjVJAvD/SOH9cjOUgvIPLqmSWHfpmWl+sdHYMyqMn9DbRmmb8NREnsMqteWZ5UcSO2oAutrvvvxQ==", - "requires": { - "defaults": "^1.0.3", - "object-prettify": "^1.0.0" - } - }, "util": { "version": "0.12.3", "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", diff --git a/package.json b/package.json index ef78e7f4d..a388e3a2d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "bugs": { "url": "https://github.com/TF2Autobot/tf2autobot/issues" }, - "updateMessage": "โข <=v3.6.8 - Check your Node.js version. Make sure it's at least version 14 before updating your bot to v3.7.0. Manual update recommended.", + "updateMessage": "โข <=v3.6.8 - Check your Node.js version. Make sure it's at least version 14 before updating your bot to the latest version. Manual update recommended.\nโข v3.7.0 - Clear to update with \"!updaterepo\" command.", "homepage": "https://github.com/TF2Autobot/tf2autobot#readme", "dependencies": { "@tf2autobot/tradeoffer-manager": "^2.11.2", @@ -30,7 +30,7 @@ "bluebird": "^3.7.2", "bluebird-global": "^1.0.1", "body-parser": "^1.19.0", - "bptf-listings-2": "^1.3.5", + "bptf-listings-2": "^1.3.6", "bptf-login-2": "^1.0.2", "callback-queue": "^3.0.0", "change-case": "^4.1.2", @@ -61,7 +61,7 @@ "steamid": "^1.1.3", "tf2": "^3.0.2", "tf2-currencies-2": "^1.2.5", - "tf2-schema-2": "^1.5.0", + "tf2-schema-2": "^1.5.1", "tf2-sku-2": "^1.1.1", "url": "^0.11.0", "valid-url": "^1.0.9", @@ -74,7 +74,7 @@ "@babel/preset-typescript": "^7.13.0", "@types/async": "^3.2.5", "@types/bluebird-global": "^3.5.12", - "@types/cheerio": "^0.22.27", + "@types/cheerio": "^0.22.28", "@types/death": "^1.1.1", "@types/express": "^4.17.11", "@types/graceful-fs": "^4.1.5", @@ -85,8 +85,8 @@ "@types/semver": "^7.3.4", "@types/socket.io-client": "^1.4.34", "@types/valid-url": "^1.0.3", - "@typescript-eslint/eslint-plugin": "^4.18.0", - "@typescript-eslint/parser": "^4.18.0", + "@typescript-eslint/eslint-plugin": "^4.19.0", + "@typescript-eslint/parser": "^4.19.0", "eslint": "^7.22.0", "eslint-plugin-jest": "^24.3.2", "eslint-plugin-prettier": "^3.3.1", diff --git a/src/classes/Commands/Commands.ts b/src/classes/Commands/Commands.ts index 7b1a8bd05..c4197497a 100644 --- a/src/classes/Commands/Commands.ts +++ b/src/classes/Commands/Commands.ts @@ -59,7 +59,7 @@ export default class Commands { this.message = new c.MessageCommand(bot); this.misc = new c.MiscCommands(bot); this.opt = new c.OptionsCommand(bot); - this.pManager = new c.PricelistManager(bot); + this.pManager = new c.PricelistManager(bot, pricer); this.request = new c.RequestCommands(bot, pricer); this.review = new c.ReviewCommands(bot); this.status = new c.StatusCommands(bot); @@ -200,7 +200,7 @@ export default class Commands { this.pManager.getCommand(steamID, message); } else if (command === 'getall' && isAdmin) { void this.pManager.getAllCommand(steamID, message); - } else if (command === 'getslots' && isAdmin) { + } else if (['getslots', 'listings'].includes(command) && isAdmin) { void this.pManager.getSlotsCommand(steamID); } else if (command === 'autoadd' && isAdmin) { void this.pManager.autoAddCommand(steamID, message); diff --git a/src/classes/Commands/sub-classes/Help.ts b/src/classes/Commands/sub-classes/Help.ts index 46cbeca24..19d36d54d 100644 --- a/src/classes/Commands/sub-classes/Help.ts +++ b/src/classes/Commands/sub-classes/Help.ts @@ -34,7 +34,7 @@ export default class HelpCommands { '!shuffle - Shuffle pricelist entries.', '!get (sku|name|defindex|item)= - Get raw information about a pricelist entry', '!getAll [limit=