Readd
Some checks failed
Deploy bot / build-and-deploy (push) Failing after 2s

This commit is contained in:
2025-08-26 00:28:59 +02:00
commit 7a87b284af
40 changed files with 3681 additions and 0 deletions

27
bot/commands/ping.js Normal file
View File

@ -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) + "h " + pad(minutes) + "m " + pad(seconds) + "s.";
}
exports.name = "ping";
exports.description = ":ping_pong: View service statistics.";
exports.usage = "CLIENT_PREFIX:ping";
exports.example = "CLIENT_PREFIX:ping";
exports.hidden = true;
exports.run = async (client, message, args) => {
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**.\nClient uptime is **${format(process.uptime())}**`
);
});
};