fix negative ping, also better localization for it
All checks were successful
PR Check / lint-and-format (pull_request) Successful in 33s
All checks were successful
PR Check / lint-and-format (pull_request) Successful in 33s
This commit is contained in:
parent
467fce3a01
commit
621acc6ed9
3 changed files with 10 additions and 9 deletions
|
@ -23,10 +23,9 @@ export default {
|
|||
withResponse: true,
|
||||
});
|
||||
|
||||
interaction.editReply(
|
||||
`${loc?.get("c_ping1")}: \
|
||||
${sent.resource!.message!.createdTimestamp - interaction.createdTimestamp}ms
|
||||
${loc?.get("c_ping2")}: ${client.ws.ping}ms.`,
|
||||
);
|
||||
const total = sent.resource!.message!.createdTimestamp - interaction.createdTimestamp;
|
||||
const ws = client.ws.ping == -1 ? loc?.get("c_ping3") : client.ws.ping + "ms";
|
||||
|
||||
interaction.editReply(`${loc?.get("c_ping1")} ${total}ms\n${loc?.get("c_ping2")} ${ws}.`);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
"c_ping_name": "Ping",
|
||||
"c_ping_desc": "Pong!",
|
||||
"c_ping1": "Roundtrip latency",
|
||||
"c_ping2": "Web socket heartbeat",
|
||||
"c_ping1": "Roundtrip latency:",
|
||||
"c_ping2": "Web socket heartbeat:",
|
||||
"c_ping3": "Unknown",
|
||||
|
||||
"c_help_name": "Help",
|
||||
"c_help_desc": "Information about commands",
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
"c_ping_name": "Ping",
|
||||
"c_ping_desc": "Pong!",
|
||||
"c_ping1": "Latence totale",
|
||||
"c_ping2": "Latence du Web socket",
|
||||
"c_ping1": "Latence totale :",
|
||||
"c_ping2": "Latence du Web socket :",
|
||||
"c_ping3": "Inconnu",
|
||||
|
||||
"c_help_name": "Aide",
|
||||
"c_help_desc": "Informations sur les commandes",
|
||||
|
|
Loading…
Reference in a new issue