From a48b62833d45d804d395bb5c3acdf7ff9dd6640c Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Mon, 26 Jun 2023 09:34:20 +0200 Subject: [PATCH] Fix when no webhook set --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 88adeb3..56f0fa7 100644 --- a/index.js +++ b/index.js @@ -123,7 +123,11 @@ function vpnDisconnect() { async function startBot(accountName) { const accountPath = `./accounts/${accountName}.json`; if (fs.existsSync(accountPath)) { - let commandSuffix = `--discord ${process.env.WEBHOOK}`; + let commandSuffix = ''; + + if (process.env.WEBHOOK === '1') { + commandSuffix += ` --discord ${process.env.WEBHOOK}`; + } if (process.env.PRINT_CONSOLE_LOGS === '1') { commandSuffix += ' --print-to-webhook';