Skip to content

Commit

Permalink
🔨 fix still getting error if Steam API is set
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed May 2, 2024
1 parent bb264ec commit f00e5bb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/classes/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1246,16 +1246,18 @@ export default class Bot {
this.listingManager.setUserID(this.userID);
}

if (this.options.steamApiKey) {
this.manager.apiKey = this.options.steamApiKey;
}

return new Promise((resolve, reject) => {
this.manager.setCookies(cookies, err => {
if (err) {
return reject(err);
}

// Steam API key likely become 0000s after calling setCookies
// if useAccessToken is false (STEAM_API_KEY is defined)
if (this.options.steamApiKey) {
this.manager.apiKey = this.options.steamApiKey;
}

resolve();
});
});
Expand Down

0 comments on commit f00e5bb

Please sign in to comment.