Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
Discordjs: How can I calculate a server or users time since joining?

Basicly I want to somehow calculate a server or users time since joining discord.

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"

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!