Skip to content

Instantly share code, notes, and snippets.

@KOULIKS94
Created March 24, 2025 13:54
Show Gist options
  • Select an option

  • Save KOULIKS94/da3c4db1b975c4407e8d31af98c63358 to your computer and use it in GitHub Desktop.

Select an option

Save KOULIKS94/da3c4db1b975c4407e8d31af98c63358 to your computer and use it in GitHub Desktop.
const { bot } = require('../lib');
bot(
{
pattern: 'uptime',
desc: 'Check bot uptime',
type: 'utility',
},
async (message) => {
let uptime = process.uptime();
let hours = Math.floor(uptime / 3600);
let minutes = Math.floor((uptime % 3600) / 60);
let seconds = Math.floor(uptime % 60);
await message.send(`🕒 *Bot Uptime:* ${hours}h ${minutes}m ${seconds}s`);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment