import type { Client } from "discord.js"

export default function (uptime: Client["uptime"]) {
	if (!uptime) return "0J, 0H, 0M et 0S"
	const days = Math.floor(uptime / 86400000)
	const hours = Math.floor(uptime / 3600000) % 24
	const minutes = Math.floor(uptime / 60000) % 60
	const seconds = Math.floor(uptime / 1000) % 60
	return `${days}J, ${hours}H, ${minutes}M et ${seconds}S`
}
