From e8c58596a8f47e4632a864ba53c5dae5a8229a23 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Mon, 14 Oct 2024 00:42:09 +0300 Subject: [PATCH] feat: make querying the HTTP api not required --- protocols/satisfactory.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/protocols/satisfactory.js b/protocols/satisfactory.js index 354eb17..793fde2 100644 --- a/protocols/satisfactory.js +++ b/protocols/satisfactory.js @@ -28,6 +28,15 @@ export default class satisfactory extends Core { const nameLength = response.int(2) state.name = response.part(nameLength).toString('utf-8') + try { + await this.doHttpApiQueries(state) + } catch (e) { + this.logger.debug('HTTP API query failed.') + this.logger.debug(e) + } + } + + async doHttpApiQueries (state) { const headers = { 'Content-Type': 'application/json' }