discord.js use random code example
Example 1: discord.js random message
// Add here the messages you want to be displayed.
const messages = ["Message1", "Message2", "Message3", "Message4"]
const randomMessage = messages[Math.floor(Math.random() * messages.length)];
// The message will log into the console!
console.log(randomMessage)
Example 2: discord.js random output
var options = ["Your options", "Another option!", "This is an option."];
var chosenOption = Math.floor(Math.random() * options.length);
console.log(options[option]);