I was looking at both createdAt and timestamps but I'm not sure how could I get the time either in hour or days format. I want to make an info embed which can show how long the user or guild is on discord. How could I make it? The bot is in JavaScript in Discordjs v13.
Something like:
"Guild created 6 month and 5 days ago"
"User joined discord 3 month and 10 days ago"
Just use discord unix timestamps and Message, so like:
const embed = new MessageEmbed()
.setTitle("Guild Info")
.setDescription(`**Guild Created:** <t:${Math.floor(message.guild.createdTimestamp / 1000)}:R>`)
message.channel.send({
embeds: [embed]
})
and same for user, hope this helps