update ping.ts

This commit is contained in:
2026-01-12 18:13:47 +03:00
parent 09b283d02f
commit 8d1265396c
+2 -2
View File
@@ -8,9 +8,9 @@ export class Ping implements ChatCommand {
description = "Ping between received and sent message";
async execute(msg: Message) {
const then = new Date().getMilliseconds();
const then = Date.now();
await oldSendMessage(msg, "pong").catch(logError);
const now = new Date().getMilliseconds();
const now = Date.now();
const diff = Math.abs(now - then);
await oldSendMessage(msg, `ping: ${diff}ms`).catch(logError);
}