So this is the code I have so far I am just trying to get it to submit a random message to the webhook instead of just a static message! I'm pretty sure I need to set up an array or something please help!
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>random title</title>
<button onclick="sendMessage()">Send</button>
<script>
function sendMessage() {
const request = new XMLHttpRequest();
request.open("POST", "/mywebhook address");
request.setRequestHeader('Content-type', 'application/json');
const params = {
username: "My Webhook Name",
avatar_url: "",
content: "THIS IS THE SECTION I WANT TO BE A RANDOM NUMBER!!!"
}
request.send(JSON.stringify(params));
}
</script>