Message Variables
Look up the message variablesA %PLACEHOLDER% the bot fills in when it sends each feature fills in, and the variables used by mapped webhooksA URL that turns signed JSON into a Discord message.
How Variables Work
- Writing one — Type the variable exactly as shown, with its percent signs, in a message field.
- Feature support — Each feature fills in only the variables listed for it, and any other variable stays in the message as written.
- Variable buttons — Message fields in the feature editor show a button for each variable that feature supports, and selecting one inserts it at the cursor.
- Mentions — A variable that becomes a mention shows the member or channel, but never notifies them.
Variables by Feature
| Variable | Becomes | Features |
|---|---|---|
%CHANNEL_MENTION% | A mention of the source channel | Message copiers |
%CHANNEL_TAG% | A mention of the event's channel | Event broadcasts |
%CREATOR_TAG% | A mention of the event's creator | Event broadcasts |
%EVENT_DESCRIPTION% | The event's description | Event broadcasts |
%EVENT_NAME% | The event's name | Event broadcasts |
%GUILD_NAME% | The server's name | Anti-raid membership gateRoles and a welcome once a member passes screening |
%ITEM_LINK% | The feed item's link | RSS feeds |
%ITEM_TITLE% | The feed item's title | RSS feeds |
%LOCATION% | The external event's location | Event broadcasts |
%MEMBER_MENTION% | A mention of the member or author | Anti-raid membership gateRoles and a welcome once a member passes screening, role messages, message copiers |
%MEMBER_TAG% | The author's username | Message copiers |
%MEMBER_USER_MENTION% | A mention of the member or author | Impersonator alerts, scammer alerts |
%MESSAGE_CONTENT% | The message text after replacementsA find-and-replace applied before a message is relayed | Message copiers |
%MESSAGE_EXCERPT% | The first 500 characters of the message text after replacementsA find-and-replace applied before a message is relayed | Message copiers |
%MESSAGE_URL% | A link to the original message | Message copiers |
%SCHEDULED_TIME% | The event's start time, in each reader's time zoneThe zone a schedule's times are read in; UTC by default | Event broadcasts |
%USER_COUNT% | The interested-member count Discord sent | Event broadcasts |
%YEAR% | The current year | Anti-raid membership gateRoles and a welcome once a member passes screening, role messages, scheduled posts, message proxies, mapped webhooksA URL that turns signed JSON into a Discord message |
%YEAR% uses UTC everywhere except scheduled posts, which use the rule's time zoneThe zone a schedule's times are read in; UTC by default at the scheduled time. %CHANNEL_TAG% is a clickable channel mention.
Message proxies have no message field, so they fill in %YEAR% in the text they relay, including text that replacementsA find-and-replace applied before a message is relayed add.
Regex rule and affiliate cleanup direct messages, auto replies, and suspicious-word alerts don't fill in any variables, even where their message fields show the variable buttons.
The Invite Page
The invite pageA public page that hands out short-lived Discord invites has no placeholders. The designer fills in the server's name, icon, member count, and boost level for you, as described in Web Applications.
Webhook Variables
A mapped webhookA URL that turns signed JSON into a Discord message's message uses webhook variablesAn @PLACEHOLDER@ filled from the webhook's JSON written as @ID@, filled from fields in each request's JSON. Signed Webhooks explains each variable type.