From 937099e45faaaa7e8074770bb2a60e785433f2db Mon Sep 17 00:00:00 2001 From: Jabu2 <31703017+Jabu2@users.noreply.github.com> Date: Sun, 6 Oct 2019 22:51:47 +0200 Subject: [PATCH] Update index.js Latency is NaN, but with createdAt it works --- Ep_02/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ep_02/index.js b/Ep_02/index.js index c5d0295..90b612d 100644 --- a/Ep_02/index.js +++ b/Ep_02/index.js @@ -45,7 +45,7 @@ client.on("message", async message => { const msg = await message.channel.send(`🏓 Pinging....`); // Edit the message - msg.edit(`🏓 Pong!\nLatency is ${Math.floor(msg.createdTimestap - message.createdTimestap)}ms\nAPI Latency is ${Math.round(client.ping)}ms`); + msg.edit(`🏓 Pong!\nLatency is ${Math.floor(msg.createdAt - message.createdAt)}ms\nAPI Latency is ${Math.round(client.ping)}ms`); } if (cmd === "say") {