📜  如何在 discord.js 中进行 ping - Javascript 代码示例

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

代码示例1
if(cmd === `${prefix}ping`) {
        message.channel.send("Pinging...").then(m =>{
            var ping = m.createdTimestamp - message.createdTimestamp;
            var botPing = Math.round(bot.pi);

            m.edit(`**:ping_pong: Pong! Your Ping Is:-**\n  ${ping}ms`);
        });
    }