Skip to content

Commit

Permalink
refactor: set api key before cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
Hhanuska committed May 1, 2024
1 parent 54fe510 commit ab385bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/classes/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1247,16 +1247,16 @@ export default class Bot {
this.listingManager.setUserID(this.userID);
}

if (process.env.STEAM_API_KEY) {
this.manager.apiKey = process.env.STEAM_API_KEY;
}

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

if (process.env.STEAM_API_KEY) {
this.manager.apiKey = process.env.STEAM_API_KEY;
}

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

0 comments on commit ab385bb

Please sign in to comment.