From 80f4b9a2243125e60c8ab34e566ff5103dccf48c Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Sun, 25 Jun 2023 14:04:03 +0200 Subject: [PATCH] Fix4 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}"`); } }