fix negative ping, also better localization for it
All checks were successful
PR Check / lint-and-format (pull_request) Successful in 33s

This commit is contained in:
Mylloon 2025-01-03 12:02:28 +01:00
parent 467fce3a01
commit 621acc6ed9
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 10 additions and 9 deletions

View file

@ -23,10 +23,9 @@ export default {
withResponse: true, withResponse: true,
}); });
interaction.editReply( const total = sent.resource!.message!.createdTimestamp - interaction.createdTimestamp;
`${loc?.get("c_ping1")}: \ const ws = client.ws.ping == -1 ? loc?.get("c_ping3") : client.ws.ping + "ms";
${sent.resource!.message!.createdTimestamp - interaction.createdTimestamp}ms
${loc?.get("c_ping2")}: ${client.ws.ping}ms.`, interaction.editReply(`${loc?.get("c_ping1")} ${total}ms\n${loc?.get("c_ping2")} ${ws}.`);
);
}, },
}; };

View file

@ -6,8 +6,9 @@
"c_ping_name": "Ping", "c_ping_name": "Ping",
"c_ping_desc": "Pong!", "c_ping_desc": "Pong!",
"c_ping1": "Roundtrip latency", "c_ping1": "Roundtrip latency:",
"c_ping2": "Web socket heartbeat", "c_ping2": "Web socket heartbeat:",
"c_ping3": "Unknown",
"c_help_name": "Help", "c_help_name": "Help",
"c_help_desc": "Information about commands", "c_help_desc": "Information about commands",

View file

@ -6,8 +6,9 @@
"c_ping_name": "Ping", "c_ping_name": "Ping",
"c_ping_desc": "Pong!", "c_ping_desc": "Pong!",
"c_ping1": "Latence totale", "c_ping1": "Latence totale :",
"c_ping2": "Latence du Web socket", "c_ping2": "Latence du Web socket :",
"c_ping3": "Inconnu",
"c_help_name": "Aide", "c_help_name": "Aide",
"c_help_desc": "Informations sur les commandes", "c_help_desc": "Informations sur les commandes",