Fix when no webhook set
This commit is contained in:
6
index.js
6
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';
|
||||
|
||||
Reference in New Issue
Block a user