Discord values
Work with mentions, timestamps, IDs, message links and autocomplete choices.
Format user mention
Builds a Discord mention for a user.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| User | User | Yes | The user to mention. |
Outputs
| Name | Type | Details |
|---|---|---|
| Mention | Text | Mention markup like <@123>. |
Format role mention
Builds a Discord mention for a role.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Role | Role | Yes | The role to mention. |
Outputs
| Name | Type | Details |
|---|---|---|
| Mention | Text | Mention markup like <@&123>. |
Format channel mention
Builds a Discord channel link for a channel.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Channel | Channel | Yes | The channel to link. |
Outputs
| Name | Type | Details |
|---|---|---|
| Mention | Text | Channel 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
| Name | Type | Required | Details |
|---|---|---|---|
| Id | Text | Yes | The Discord id to mention (17-20 digits). Maximum length: 20 characters. |
| Mention type | Mention type | Yes | What the id points at: a user, a role or a channel. Default: User. |
Outputs
| Name | Type | Details |
|---|---|---|
| Mention | Text | Mention markup like <@123>, <@&123> or <#123>. |
Format Discord timestamp
Formats a date as a Discord dynamic timestamp tag.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Date | Date and time | Yes | The date and time to format. |
| Style | Timestamp style | Yes | How Discord shows the date. Each reader sees it in their own time zone and language. Default: Short date and time. |
Outputs
| Name | Type | Details |
|---|---|---|
| Result | Text | Discord 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
| Name | Type | Required | Details |
|---|---|---|---|
| Items | List of Any | Yes | The values to offer. Texts are used as-is; lookup table entries use their key; storage entries use their subject. |
| Label path | Text | No | Which field of each item to show, e.g. "name". Leave blank to use the item itself. Maximum length: 100 characters. |
| Value path | Text | No | Which field of each item to send back, e.g. "id". Defaults to the label. Maximum length: 100 characters. |
| Filter | Text | No | Optional. Keep only items matching this text (case-insensitive, prefix matches first). Use the option's typed value here for live filtering. |
| Limit | Whole number | No | Optional. Maximum number of choices to return (1 - 25, default 25). Value: 1 to 25. Default: 25. |
Outputs
| Name | Type | Details |
|---|---|---|
| Choices | List of Command option choice | The 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
| Name | Type | Required | Details |
|---|---|---|---|
| Date | Date and time | Yes | The date and time to format. |
Outputs
| Name | Type | Details |
|---|---|---|
| Result | Text | Discord 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
| Name | Type | Required | Details |
|---|---|---|---|
| Text | Text | No | The text to use as the ID. Use this or Number. Use only one of these: Number. |
| Number | Whole number | No | A whole number to use as the ID. Use this or Text. Use only one of these: Text. |
Outputs
| Name | Type | Details |
|---|---|---|
| ID | ID | The ID. |
Read message link
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
| Name | Type | Required | Details |
|---|---|---|---|
| Message link | Text | Yes | The Discord message link (https://discord.com/channels/<server>/<channel>/<message>). |
Outputs
| Name | Type | Details |
|---|---|---|
| Server ID | Discord ID | The server ID, or empty for a direct-message link or a non-matching input. May be empty. |
| Channel ID | Discord ID | The channel ID, or empty when the input is not a message link. May be empty. |
| Message ID | Discord ID | The message ID, or empty when the input is not a message link. May be empty. |
Build message link
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
| Name | Type | Required | Details |
|---|---|---|---|
| Message | Message | No | The message to build a link for. Takes priority over the IDs below. Use only one of these: Channel ID. |
| Server ID | Discord ID | No | The server ID, or empty for a direct-message link. Used when Message is not set. |
| Channel ID | Discord ID | No | The channel ID. Used when Message is not set. Use only one of these: Message. |
| Message ID | Discord ID | No | The message ID. Used when Message is not set. |
Outputs
| Name | Type | Details |
|---|---|---|
| Message link | URL | The 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
| Name | Type | Required | Details |
|---|---|---|---|
| Text | Text | Yes | Text that is or contains a mention such as <@123>, <@&123>, or <#123>. |
Outputs
| Name | Type | Details |
|---|---|---|
| ID | Discord ID | The mentioned ID, or empty when no mention is found. May be empty. |
| Kind | Mention kind | Whether 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
| Name | Type | Required | Details |
|---|---|---|---|
| Discord ID | Discord ID | Yes | The Discord ID. |
Outputs
| Name | Type | Details |
|---|---|---|
| Date | Date and time | The creation timestamp. |
Discord ID from text
Reads a Discord ID from text. Returns an empty value if invalid.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Text | Text | Yes | Text containing the Discord ID. |
Outputs
| Name | Type | Details |
|---|---|---|
| Discord ID | Discord ID | The Discord ID, or empty. May be empty. |
Generate ID
Generates a random unique identifier (UUID).
Outputs
| Name | Type | Details |
|---|---|---|
| ID | Text | The generated unique identifier. |