📜  随机 discord.js - Javascript 代码示例

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

代码示例3
client.on('message', msg => {
const Responses = [
    "رسالة 1",
    "رسالة 2",
    "رسالة 3",
    "رسالة 4",
    "رسالة 5"
];
const Response = Math.floor(Math.random() * Responses.length);
  if (msg.content === 'رسالة') {
    msg.reply(Responses[Response]);
 }
});