Markdown for mentions, emojis and timestamps (rendered in each reader's locale), escaping, and message links.
Summary
Functions
An emoji as message text: a Lingo.Type.Emoji, or any map with its :name and :id.
Escapes Markdown in text, so it shows as typed: emphasis, code, spoilers,
and quotes, headings and lists at the start of a line.
Links a channel.
A clickable slash command. name may include a subcommand group and
subcommand: "role add".
Mentions a role.
Mentions a user.
A link to a message. Pass nil as the guild id for DMs.
A timestamp, from a DateTime or Unix seconds. style is one of
:short_time, :long_time, :short_date, :long_date,
:short_datetime (the default), :long_datetime or :relative.
Functions
An emoji as message text: a Lingo.Type.Emoji, or any map with its :name and :id.
Escapes Markdown in text, so it shows as typed: emphasis, code, spoilers,
and quotes, headings and lists at the start of a line.
Links a channel.
A clickable slash command. name may include a subcommand group and
subcommand: "role add".
Mentions a role.
Mentions a user.
A link to a message. Pass nil as the guild id for DMs.
A timestamp, from a DateTime or Unix seconds. style is one of
:short_time, :long_time, :short_date, :long_date,
:short_datetime (the default), :long_datetime or :relative.
Lingo.Format.timestamp(DateTime.utc_now(), :relative)
#=> "<t:1767225600:R>"