J Muzhen
J Muzhen

Reputation: 352

discord.py: Time object in embed

I wondered if it was possible to build something like this:example

So that it can be put into an embed and shows the time. However when I looked through the discord.py docs I could not find this type of object. Searched google but no solutions. Can anyone help? Thanks in advance!

Upvotes: 0

Views: 739

Answers (1)

Justin
Justin

Reputation: 219

Those are not Discord.py specific, actually. The special markup you see there is a timestamp style, see https://discord.com/developers/docs/reference#message-formatting-timestamp-styles.

The format is usually <t:UNIX_TIMESTAMP> or <t:UNIX_TIMESTAMP:STYLE>, where style is one of the options in the link above. These show up in the user's TZ.

To wrap up, they are just plain-text, Discord-specific styles you can place in normal messages, as well as embeds (just not in the certain places, like the footer).

Upvotes: 3

Related Questions