enhancement(lint): Fix lint errors for src/index.ts

Co-authored-by: NeonGamerBot-QK <saahilattud@gmail.com>
Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
This commit is contained in:
zeon-neon[bot] 2024-09-09 01:22:58 +00:00 committed by GitHub
parent e942ef3c7a
commit 9100de0fe1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,13 +12,13 @@ app.start(process.env.PORT || 3000).then((d) => {
const cmdLoader = new Loader(app, path.join(__dirname, "commands"));
// this is temp i swear
cmdLoader.runQuery();
function formatUptime (uptime: number = process.uptime()) {
const seconds = Math.floor(uptime % 60)
const minutes = Math.floor((uptime / 60) % 60)
const hours = Math.floor((uptime / (60 * 60)) % 24)
const days = Math.floor(uptime / (60 * 60 * 24))
function formatUptime(uptime: number = process.uptime()) {
const seconds = Math.floor(uptime % 60);
const minutes = Math.floor((uptime / 60) % 60);
const hours = Math.floor((uptime / (60 * 60)) % 24);
const days = Math.floor(uptime / (60 * 60 * 24));
return `${days}d ${hours}h ${minutes}m ${seconds}s`
return `${days}d ${hours}h ${minutes}m ${seconds}s`;
}
// Listen for users opening your App Home
@ -81,7 +81,7 @@ app.event("app_home_opened", async ({ event, client, logger }) => {
type: "section",
text: {
type: "mrkdwn",
text: "Uptime: `{uptime}`".replace('{uptime}', formatUptime()),
text: "Uptime: `{uptime}`".replace("{uptime}", formatUptime()),
},
},
{