File size: 682 Bytes
d8a4b7b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
module.exports = {
before: async function all(m) {
if (global.autobio) {
setInterval(async () => {
let uptime = process.uptime() * 1000;
let bio = `🤖 Aktif Selama: ${clockString(uptime)} | 💌 by: ${wm}`;
await this.updateProfileStatus(bio).catch(_ => _);
}, 60000);
}
}
}
function clockString(ms) {
let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000);
let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60;
let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60;
return [h, m, s].map(v => v.toString().padStart(2, '0')).join(':');
}
function pickRandom(list) {
return list[Math.floor(Math.random() * list.length)];
}
|