From 6b58361d31b8ba898945a45dec4078da84dead54 Mon Sep 17 00:00:00 2001 From: koneko <67551503+koneko@users.noreply.github.com> Date: Fri, 8 Aug 2025 01:08:16 +0200 Subject: [PATCH] a little more --- commands/estimate.js | 10 ++++++++++ commands/ping.js | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 commands/estimate.js create mode 100644 commands/ping.js diff --git a/commands/estimate.js b/commands/estimate.js new file mode 100644 index 0000000..04b72dc --- /dev/null +++ b/commands/estimate.js @@ -0,0 +1,10 @@ +exports.name = "estimate"; +exports.description = + ":money_with_wings: Give an estimated price of certain items in cv."; +exports.usage = "< { + message.channel.send(":sob: im still wokring on this one..."); +}; diff --git a/commands/ping.js b/commands/ping.js new file mode 100644 index 0000000..605d5ec --- /dev/null +++ b/commands/ping.js @@ -0,0 +1,27 @@ +function format(seconds) { + function pad(s) { + return (s < 10 ? "0" : "") + s; + } + var hours = Math.floor(seconds / (60 * 60)); + var minutes = Math.floor((seconds % (60 * 60)) / 60); + var seconds = Math.floor(seconds % 60); + + return pad(hours) + ":" + pad(minutes) + ":" + pad(seconds); +} + +exports.name = "ping"; +exports.description = ":ping_pong: View service statistics."; +exports.usage = "< { + message.channel.send("Fetching data...").then((m) => { + m.edit( + `🏓 Latency is **${ + m.createdTimestamp - message.createdTimestamp + }ms**.\nAPI Latency is **${Math.round( + client.ws.ping + )}ms**.\n**Client uptime is ${format(process.uptime())}**` + ); + }); +};