I was looking to set up a simple Discord command to request a shout-out within my stream. I've set up the alert itself within an HTML file, but I really have no clue where to start in getting Node.js to send the alert to the page.
The code provided is what I'm currently using to display the alert.
This is to display an alert box within OBS.
var audio = new Audio('discord.mp3');
function shoutOut(name){
audio.play();
document.getElementById("shoutout").innerHTML = `${name} bought a shout-out!`;
console.log("it worked");
$("#container").fadeIn(1000);
setTimeout(() => {
$("#container").fadeOut(1000);
}, 5000);
}
I'm just expecting it to display the alert upon usage of a Discord command.