I have figured out how to loop through a string (sorta), although I can't seem to randomize each individual output. In my code, I use the follow line to sort through each string.
const data = [m1, m2, m3, m4, m5];
const randomElement = data[Math.floor(Math.random() * data.length)];
Although, in my code that uses the const "randomElement", it randomizes the first output but stays the same all throughout.
setInterval(function() {
minecraftBot.chat(randomElement);
console.log("Sent Message " + randomElement)
}, interval);`
How can I randomize each individual output?
I was trying to randomize each output.
I.e :
m1
m5
m4
m3
Etc.
Although in my code it only randomizes it like this:
m1, m1, m1, m1, etc
or m4, m4, m4