Answers for "random message in discord.js"

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

Browse Popular Code Answers by Language