Fix4
This commit is contained in:
4
index.js
4
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}"`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user