diff --git a/index.js b/index.js index ef5269a..5d0f402 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -const { execSync } = require('child_process'); +const { execSync, exec } = require('child_process'); const { get } = require('./modules/fetchHandler'); const fs = require('node:fs'); const os = require('os'); @@ -20,7 +20,7 @@ async function consoleLog(message, type) { if (process.env.MCR_BOT_WEBHOOK) { const webhook = process.env.MCR_BOT_WEBHOOK; const botUsername = `m${process.env.MCR_BOT_WEBHOOK_NAME}`; - execSync(`curl --silent -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{"content": "${message}", "username": "${botUsername}"}" "${webhook}"`); + exec(`curl --silent -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{"content": "${message}", "username": "${botUsername}"}" "${webhook}"`); } }