This commit is contained in:
2023-06-25 14:04:03 +02:00
parent 41ca964e56
commit 80f4b9a224

View File

@@ -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}"`);
}
}