Answers for "discord.js random message"

0

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)
Posted by: Guest on October-31-2020
0

random message in discord.js

module.exports = {
    name: 'random',
    description: 'random?',
    execute(message, args){
        // Now the randomMessage will be recalculated every time the command is run
        const randomMessage = messages[Math.floor(Math.random() * messages.length)];
        message.channel.send(randomMessage);
    }
}
Posted by: Guest on May-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language