From 54fe5100fdd14f2f0a84fbb60e7c1ebd25adce12 Mon Sep 17 00:00:00 2001 From: Hhanuska <41262567+Hhanuska@users.noreply.github.com> Date: Wed, 1 May 2024 17:23:38 +0200 Subject: [PATCH] feat: api key in env --- src/classes/Bot.ts | 4 ++++ template.ecosystem.json | 5 ++--- template.env | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/classes/Bot.ts b/src/classes/Bot.ts index 716ffdadf..e8d96d5c0 100644 --- a/src/classes/Bot.ts +++ b/src/classes/Bot.ts @@ -1253,6 +1253,10 @@ export default class Bot { return reject(err); } + if (process.env.STEAM_API_KEY) { + this.manager.apiKey = process.env.STEAM_API_KEY; + } + resolve(); }); }); diff --git a/template.ecosystem.json b/template.ecosystem.json index 2427a7f21..c187f15b7 100644 --- a/template.ecosystem.json +++ b/template.ecosystem.json @@ -17,6 +17,7 @@ "STEAM_PASSWORD": "", "STEAM_SHARED_SECRET": "", "STEAM_IDENTITY_SECRET": "", + "STEAM_API_KEY": "", "BPTF_ACCESS_TOKEN": "", "BPTF_API_KEY": "", @@ -28,9 +29,7 @@ "STEAMSUPPLY_API_KEY": "", "STEAMAPIS_API_KEY": "", - "ADMINS": [ - { "steam": "", "discord": null } - ], + "ADMINS": [{ "steam": "", "discord": null }], "KEEP": [""], "ITEM_STATS_WHITELIST": [], "GROUPS": ["103582791469033930"], diff --git a/template.env b/template.env index 3d85a25d8..c56ff2b94 100644 --- a/template.env +++ b/template.env @@ -4,6 +4,7 @@ STEAM_ACCOUNT_NAME="" STEAM_PASSWORD="" STEAM_SHARED_SECRET="" STEAM_IDENTITY_SECRET="" +STEAM_API_KEY="" BPTF_ACCESS_TOKEN="" BPTF_API_KEY=""