diff --git a/package-lock.json b/package-lock.json index 501eca474..de747191e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tf2autobot", - "version": "5.12.0", + "version": "5.12.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tf2autobot", - "version": "5.12.0", + "version": "5.12.2", "license": "MIT", "dependencies": { "@tf2autobot/bptf-listings": "^5.7.7", diff --git a/package.json b/package.json index 7885d7558..97095fd9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tf2autobot", - "version": "5.12.0", + "version": "5.12.2", "description": "Fully automated TF2 trading bot advertising on www.backpack.tf using prices from www.prices.tf, Originally made by Nicklason.", "main": "dist/app.js", "scripts": { diff --git a/src/classes/Bot.ts b/src/classes/Bot.ts index f022bbcc8..0861428c2 100644 --- a/src/classes/Bot.ts +++ b/src/classes/Bot.ts @@ -570,6 +570,7 @@ export default class Bot { } startAutoRefreshListings(): void { + return; // Automatically check for missing listings every 30 minutes let pricelistLength = 0; @@ -1401,7 +1402,7 @@ export default class Bot { resolve(null); }; - const errorEvent = (err): void => { + const errorEvent = (err: CustomError): void => { gotEvent(); this.client.removeListener('loggedOn', loggedOnEvent); @@ -1409,7 +1410,14 @@ export default class Bot { log.error('Failed to sign in to Steam: ', err); - reject(err); + if (err.eresult === EResult.AccessDenied) { + // Access denied during login + this.deleteRefreshToken().finally(() => { + reject(err); + }); + } else { + reject(err); + } }; const timeout = setTimeout(() => {