Skip to content

Commit

Permalink
🔨 use options
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed May 2, 2024
1 parent ab385bb commit 0cb7605
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/classes/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1247,8 +1247,8 @@ export default class Bot {
this.listingManager.setUserID(this.userID);
}

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

return new Promise((resolve, reject) => {
Expand Down
2 changes: 2 additions & 0 deletions src/classes/Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2178,6 +2178,7 @@ export default interface Options extends JsonOptions {
steamPassword?: string;
steamSharedSecret?: string;
steamIdentitySecret?: string;
steamApiKey?: string;

bptfAccessToken?: string;
bptfApiKey?: string;
Expand Down Expand Up @@ -2494,6 +2495,7 @@ export function loadOptions(options?: Options): Options {
steamPassword: getOption('steamPassword', '', String, incomingOptions),
steamSharedSecret: getOption('steamSharedSecret', '', String, incomingOptions),
steamIdentitySecret: getOption('steamIdentitySecret', '', String, incomingOptions),
steamApiKey: getOption('steamApiKey', '', String, incomingOptions),

bptfAccessToken: getOption('bptfAccessToken', '', String, incomingOptions),
bptfApiKey: getOption('bptfApiKey', '', String, incomingOptions),
Expand Down

0 comments on commit 0cb7605

Please sign in to comment.