I need a discord bot for can online multiplayer server. What I want to do is to send that change in report logs file which is present in FTP to the discord channel whenever there is a change in the server logs. Logfile is in the FTP server.
// The log from your bot.
let log = "ZAK%156.203.237.174%Bilal%205.164.106.26%wallhack";
function formatResult(result) {
let splitResult = result.split("%");
return {
"Reported by": splitResult[0],
"Reported IP": splitResult[1],
"Reported Player": splitResult[2],
"Reported Player IP": splitResult[3],
"Report": splitResult[4]
}
}
console.log(formatResult(log));
/*
{
"Reported by": "ZAK",
"Reported IP": "156.203.237.174",
"Reported Player": "Bilal",
"Reported Player IP": "205.164.106.26",
"Report": "wallhack"
}
*/