Passa al contenuto principale

Discord values

Work with mentions, timestamps, IDs, message links and autocomplete choices.

Format user mention​

Builds a Discord mention for a user.

Inputs

NameTypeRequiredDetails
UserUserYesThe user to mention.

Outputs

NameTypeDetails
MentionTextMention markup like <@123>.

Format role mention​

Builds a Discord mention for a role.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to mention.

Outputs

NameTypeDetails
MentionTextMention markup like <@&123>.

Format channel mention​

Builds a Discord channel link for a channel.

Inputs

NameTypeRequiredDetails
ChannelChannelYesThe channel to link.

Outputs

NameTypeDetails
MentionTextChannel markup like <#123>.

Format mention from id​

Builds the mention markup for an id you already hold, without fetching the user, role or channel first. Pick the type so the right markup is used.

Inputs

NameTypeRequiredDetails
IdTextYesThe Discord id to mention (17-20 digits). Maximum length: 20 characters.
Mention typeMention typeYesWhat the id points at: a user, a role or a channel. Default: User.

Outputs

NameTypeDetails
MentionTextMention markup like <@123>, <@&123> or <#123>.

Format Discord timestamp​

Formats a date as a Discord dynamic timestamp tag.

Inputs

NameTypeRequiredDetails
DateDate and timeYesThe date and time to format.
StyleTimestamp styleYesHow Discord shows the date. Each reader sees it in their own time zone and language. Default: Short date and time.

Outputs

NameTypeDetails
ResultTextDiscord timestamp markup like <t:1234567890:R>.

Build autocomplete choices​

Turns a list of runtime values (e.g. stored keys) into autocomplete choices to feed into "Send autocomplete response". Optionally filters them by what the user has typed.

Inputs

NameTypeRequiredDetails
ItemsList of AnyYesThe values to offer. Texts are used as-is; lookup table entries use their key; storage entries use their subject.
Label pathTextNoWhich field of each item to show, e.g. "name". Leave blank to use the item itself. Maximum length: 100 characters.
Value pathTextNoWhich field of each item to send back, e.g. "id". Defaults to the label. Maximum length: 100 characters.
FilterTextNoOptional. Keep only items matching this text (case-insensitive, prefix matches first). Use the option's typed value here for live filtering.
LimitWhole numberNoOptional. Maximum number of choices to return (1 - 25, default 25). Value: 1 to 25. Default: 25.

Outputs

NameTypeDetails
ChoicesList of Command option choiceThe built autocomplete choices, ready for "Send autocomplete response".

Discord relative timestamp​

Formats a date as a Discord relative timestamp tag ("in 3 hours", "2 days ago") that updates live in the client.

Inputs

NameTypeRequiredDetails
DateDate and timeYesThe date and time to format.

Outputs

NameTypeDetails
ResultTextDiscord relative timestamp markup like <t:1234567890:R>.

Convert to ID​

Turns text or a whole number into an ID. An ID keeps its exact characters however long it is, so it is safe for Discord IDs and for ids from other services. Fails on empty text.

Inputs

NameTypeRequiredDetails
TextTextNoThe text to use as the ID. Use this or Number. Use only one of these: Number.
NumberWhole numberNoA whole number to use as the ID. Use this or Text. Use only one of these: Text.

Outputs

NameTypeDetails
IDIDThe ID.

Extracts the server, channel, and message IDs from a Discord message link. All three outputs are empty when the text is not a message link.

Inputs

NameTypeRequiredDetails
Message linkTextYesThe Discord message link (https://discord.com/channels/&lt;server&gt;/&lt;channel&gt;/&lt;message>).

Outputs

NameTypeDetails
Server IDDiscord IDThe server ID, or empty for a direct-message link or a non-matching input. May be empty.
Channel IDDiscord IDThe channel ID, or empty when the input is not a message link. May be empty.
Message IDDiscord IDThe message ID, or empty when the input is not a message link. May be empty.

Builds a Discord message link (jump URL), either from a Message value or from a server, channel, and message ID. The Message value takes priority when both are provided; the server segment is @me for a direct message.

Inputs

NameTypeRequiredDetails
MessageMessageNoThe message to build a link for. Takes priority over the IDs below. Use only one of these: Channel ID.
Server IDDiscord IDNoThe server ID, or empty for a direct-message link. Used when Message is not set.
Channel IDDiscord IDNoThe channel ID. Used when Message is not set. Use only one of these: Message.
Message IDDiscord IDNoThe message ID. Used when Message is not set.

Outputs

NameTypeDetails
Message linkURLThe built Discord message link (jump URL).

Read mention​

Extracts the ID and kind of the first mention (user, role, or channel) found in the text. Both outputs are empty when there is no mention.

Inputs

NameTypeRequiredDetails
TextTextYesText that is or contains a mention such as <@123>, <@&123>, or <#123>.

Outputs

NameTypeDetails
IDDiscord IDThe mentioned ID, or empty when no mention is found. May be empty.
KindMention kindWhether the mention is a user, role, or channel; empty when no mention is found. May be empty.

Discord ID to timestamp​

Extracts the creation date encoded in a Discord ID.

Inputs

NameTypeRequiredDetails
Discord IDDiscord IDYesThe Discord ID.

Outputs

NameTypeDetails
DateDate and timeThe creation timestamp.

Discord ID from text​

Reads a Discord ID from text. Returns an empty value if invalid.

Inputs

NameTypeRequiredDetails
TextTextYesText containing the Discord ID.

Outputs

NameTypeDetails
Discord IDDiscord IDThe Discord ID, or empty. May be empty.

Generate ID​

Generates a random unique identifier (UUID).

Outputs

NameTypeDetails
IDTextThe generated unique identifier.
Need more help?
Can't find what you're looking for? Our team is happy to help.