mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 22:05:10 +00:00
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:
parent
e942ef3c7a
commit
9100de0fe1
1 changed files with 7 additions and 7 deletions
14
src/index.ts
14
src/index.ts
|
|
@ -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()),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue