Embed & Message
addTimestamp
$addTimestamp[]
The $addTimestamp[] function sets the timestamp of a Discord embed to the current date and time (UTC, ISO 8601). The timestamp is displayed at the bottom of the embed, next to the footer if it is present.
Syntax
$addTimestamp[(embedIndex)]
Parameters
| Parameter | Description |
|---|---|
embedIndex |
Optional. Index of the targeted embed, from 1 to 10 (1 by default, also when empty). Any other value is an error. |
Return value
Modifies the response currently being constructed. Returns nothing.
Behavior
$addTimestampand$addTimestamp[]are both valid and target the first embed.- The timestamp is always the current time; the function does not accept a custom date or Unix timestamp.
- Discord automatically formats the timestamp in the timezone of the user viewing it.
Examples
Current timestamp
$title[Logs]
$description[A moderation action has been performed.]
$addTimestamp
$color[#ED4245]
Timestamp on the second embed
$title[Main;1]
$title[Details;2]
$addTimestamp[2]
Timestamp with footer
$title[Welcome!]
$description[
Welcome to the server **$serverName**, $username!
We are delighted to welcome you among us.
]
$footer[$serverName]
$addTimestamp
$color[#57F287]
Notes
- The timestamp is automatically localized by Discord according to each user’s timezone.
- Combine this with
$footer[]to show footer text next to the timestamp.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.