Relative timestamp in embed footer

I want to put a relative timestamp in an embed footer. setTimestamp() doesn't accept strings, so I cannot pass the relative timestamp as an argument. When I use the relative timestamp in setFooter() like this
.setFooter({
text: `Last Update: ${relativeTime}`,
})
.setFooter({
text: `Last Update: ${relativeTime}`,
})
I get this
Last Update: <t:1714575200:R>
Last Update: <t:1714575200:R>
I know it would work if the timestamp was in a description or a field value, I just want to put it in the footer so it can look a little better. Is it possible to achieve this?
5 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
IAmBatman
IAmBatmanOP7mo ago
setTimestamp displays the current time yes, but it doesn't display a dynamic timestamp, a relative timestamp does that.
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
IAmBatman
IAmBatmanOP7mo ago
Okay, that's what I was wondering. Thank you!
Want results from more Discord servers?
Add your server