📌  相关文章
📜  discord.js 中的随机消息 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:09.595000             🧑  作者: Mango

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