I made some bot uptime code but got an error showing 52 years ago The code is below.
const style = 'R'
const starttime = `<t:${Math.floor(client.readyAt / 1000)}` + (style ? `:${style}` : '') + '>'
client.on('messageCreate' , message=>{
if(message.content == "!uptime"){
message.reply(`uptime!\n uptime : ${starttime}`)
}
})
You are setting that outside of the event, where
client.readyAtisnull. When you divide null by anything except for 0, you get0. The result would then be<t:0:R>. You could either make this a function, or set it in the eventOr, setting it inside the callback: