I am trying to forward my bot's console to a channel in Discord. I assume I would use process.stdout to get the console output, and client.channels.cache.get(id).send() to send the message, but how do I combine the two and send that to a channel?
Any help is appreciated, cheers!
let console = process.openStdin()
console.addListener("data", res => {
let info = res.toString().trim().split(/ +/g)
bot.channels.get(channelidhere).send(info.join(" "));
});
Credits To: https://www.youtube.com/c/MenuDocs