how to make discord.js ping someone code example
Example 1: Bots latency discord js
var yourping = new Date().getTime() - message.createdTimestamp
var botping = Math.round(bot.ws.ping)
message.channel.send(`Your ping: ${yourping} \nBots ping: ${botping}`)
Example 2: how to make a ping in discord.js
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`);
});
}