Page MenuHomePhorge

uptime.js
No OneTemporary

Size
485 B
Referenced Files
None
Subscribers
None

uptime.js

import { SlashCommandBuilder } from 'discord.js';
const fmt = s => {
const d = Math.floor(s / 86400);
const h = Math.floor(s % 86400 / 3600);
const m = Math.floor(s % 3600 / 60);
const sec = Math.floor(s % 60);
return [d && `${d}d`, h && `${h}h`, m && `${m}m`, `${sec}s`].filter(Boolean).join(' ');
};
export default {
builder: new SlashCommandBuilder().setName('uptime').setDescription('show bot uptime'),
run: async i => i.reply(`up for ${fmt(process.uptime())}`)
};

File Metadata

Mime Type
application/javascript
Expires
Sun, May 17, 5:52 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
554566
Default Alt Text
uptime.js (485 B)

Event Timeline