From e2b95f5aecc792b973fb80edf2fca9f42b3e61f2 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 10 Jul 2020 20:15:30 -0500 Subject: [PATCH] fixed the ping command --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 17435e8..2a45847 100755 --- a/src/index.js +++ b/src/index.js @@ -92,7 +92,7 @@ client.on("message", async message => { if(command === "ping") { // Calculates ping between sending a message and editing it, giving a nice round-trip latency. const m = await message.channel.send("Ping?"); - m.edit(`Pong! Latency is ${m.createdTimestamp - message.createdTimestamp}ms`); + m.edit(`Pong! Latency is ${client.ws.ping}ms`); } ////////////////////////////////////////////////////////////////////////////// //HOW QUOTEABLE