Fix when no webhook set

This commit is contained in:
2023-06-26 09:34:20 +02:00
parent 60620177a9
commit a48b62833d

View File

@@ -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';