DiscordSRV

DiscordSRV

86.8k Downloads

UNIX Timestamps in Placeholders

Cale111 opened this issue ยท 1 comments

commented

Why?

This could be used for Discord's date feature to more easily get times in your timezone and relative to you, for example, last updated time could be relative to the current time. This could also lower the amount of updates something like a channel topic would get if you dynamically update it with the uptime.

What and How?

Maybe a placeholder like
%unixtime%

There could be UNIX timestamps for other times too, such as when the server started, for example:
%unixstarttime%

Or maybe when the server shuts down, it could be used for relative shutdown time, like:
%unixshutdowntime%

Are there alternatives?

No visible alternative for current time, the closest you can get for uptime would be the %uptimemins% and %uptimehours% placeholders, though a UNIX timestamp version would update faster. Downtime has no alternative because the server could not update a channel topic if it was offline.

Checks

  • I have used the search at least once to check if my idea has already been suggested and perhaps already implemented.

Anything else

With something like channel topics, it could be used like this:

"Server went offline [10 minutes ago]"
In the config it could look like:
ChannelTopicUpdaterChatChannelTopicAtServerShutdownFormat: "Server went offline <t:%unixshutdowntime%:R>"

"Server started [5 hours ago]"
Config:
ChannelTopicUpdaterChatChannelTopicFormat: "Server started <t:%unixstarttime%:R>"

commented

This should have been closed a while ago, closing now.