fix(ping): negative ping #218
3 changed files with 10 additions and 9 deletions
|
@ -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}.`);
|
||||||
);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue