Download plugins/info-runtime.js from Ikygantengbangetanjay/testingba: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/spaces/Ikygantengbangetanjay/testingba/resolve/main/plugins/info-runtime.js
- Command line
-
hf download hf://spaces/Ikygantengbangetanjay/testingba/plugins/info-runtime.js
-
curl -L -o info-runtime.js https://huggingface.co/spaces/Ikygantengbangetanjay/testingba/resolve/main/plugins/info-runtime.js
643 Bytes
| let handler = async (m, { }) => { | |
| let _uptime = process.uptime() * 1000 | |
| let uptime = clockString(_uptime) | |
| m.reply(`> 乂 *U P T I M E*\n•> ${uptime}`) | |
| } | |
| handler.help = ['runtime'] | |
| handler.tags = ['main'] | |
| handler.command = ['runtime', 'rt'] | |
| module.exports = handler | |
| function clockString(ms) { | |
| let d = isNaN(ms) ? '--' : Math.floor(ms / 86400000) | |
| let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) % 24 | |
| let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60 | |
| let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60 | |
| return [d, ' *Hari* ', h, ' *Jam* ', m, ' *Menit* ', s, ' *Detik* '].map(v => v.toString().padStart(2, 0)).join('') | |
| } |