How can I turn a joinedTimestamp into this Discord Timestamp

The one that automatically shows you like how long ago this timestamp was
Solution:
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Jump to solution
14 Replies
chillihero
chilliheroOP2y ago
Do you have a utility for this?
Seren_Modz 21
Seren_Modz 212y ago
u can import the time function from discord.js
Solution
Seren_Modz 21
Seren_Modz 212y ago
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
ararou!
ararou!2y ago
<t:<Date>:F> replace <Date> with your valid Unix time stamp
chillihero
chilliheroOP2y ago
i played around with it a bit and have the following problem the timestamp 1677687907708 converts to this when using a unix tool, watch the date 2023
chillihero
chilliheroOP2y ago
But when using it in discord, I get a super wierd date in the future
chillihero
chilliheroOP2y ago
chillihero
chilliheroOP2y ago
<t:1677687907708:R> <t:1677687907:R>
Krish
Krish2y ago
<t:1677687907:R> divide it by thousand and you are good
chillihero
chilliheroOP2y ago
why is that
Krish
Krish2y ago
Because Unix timestamps includes milliseconds but discord doesn't
chillihero
chilliheroOP2y ago
and discord sends unix timestamps
Krish
Krish2y ago
I am talking about <t:timestamp> notation
chillihero
chilliheroOP2y ago
this is wierd behaviour lol but ill take it thanks!
Want results from more Discord servers?
Add your server