📌  相关文章
📜  discord.js 随机消息 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:11.848000             🧑  作者: Mango

代码示例2
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);
    }
}