A tiny Discord DM-only bot that gives you copy-paste dynamic timestamp tags:
/ts [style]→ current time as<t:EPOCH:style>/ts_convert when:"Aug 21 2025 3pm PT" [style] [tz]→ parse human time →<t:EPOCH:style>
Replies are ephemeral (visible only to you) and include both the tag and a rendered preview.
-
Install to your account Install the bot to your account via this OAuth link.
-
Open a DM with the app (App Launcher → your app).
-
Use the commands
/ts→**Preview:** <t:...:f> • (<t:...:R>)+ Copy:<t:...:f>/ts_convert when:"tomorrow 14:30" tz:"America/Los_Angeles" style:F
Style codes
| Code | Renders as |
|---|---|
t |
9:41 PM |
T |
9:41:30 PM |
d |
11/23/2024 |
D |
November 23, 2024 |
f |
Nov 23, 2024 9:41 PM |
F |
Saturday, November 23, 2024… |
R |
in 2 hours / 3 days ago |
-
Hosting: Cloudflare Workers (HTTP Interactions).
-
DM-only: commands are registered with
integration_types:[1](User-Install) andcontexts:[1,2](DM & group DM). -
Files:
script.js– Worker handler (verifies signatures, routes commands)payloads.json– slash-command payloadsscripts/register.js– registers commandswrangler.toml– Worker config
- The bot only processes your slash-command payload and returns an ephemeral message.
- No privileged intents or message content access; no data is stored.
- “Bad signature/401” on the endpoint
DISCORD_PUBLIC_KEYis missing or wrong—reset the Worker secret. - Commands don’t appear in DM
Ensure you installed via the User-Install URL, the payloads here should include
integration_types:[1]andcontexts:[1,2]. - Global commands not visible yet Propagation can take minutes. For instant testing, temporarily register guild commands with a DEV guild.