Skip to main content

Message Variables

Look up the message variables each feature fills in, and the variables used by mapped webhooks.

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

VariableBecomesFeatures
%CHANNEL_MENTION%A mention of the source channelMessage copiers
%CHANNEL_TAG%A mention of the event's channelEvent broadcasts
%CREATOR_TAG%A mention of the event's creatorEvent broadcasts
%EVENT_DESCRIPTION%The event's descriptionEvent broadcasts
%EVENT_NAME%The event's nameEvent broadcasts
%GUILD_NAME%The server's nameAnti-raid membership gate
%ITEM_LINK%The feed item's linkRSS feeds
%ITEM_TITLE%The feed item's titleRSS feeds
%LOCATION%The external event's locationEvent broadcasts
%MEMBER_MENTION%A mention of the member or authorAnti-raid membership gate, role messages, message copiers
%MEMBER_TAG%The author's usernameMessage copiers
%MEMBER_USER_MENTION%A mention of the member or authorImpersonator alerts, scammer alerts
%MESSAGE_CONTENT%The message text after replacementsMessage copiers
%MESSAGE_EXCERPT%The first 500 characters of the message text after replacementsMessage copiers
%MESSAGE_URL%A link to the original messageMessage copiers
%SCHEDULED_TIME%The event's start time, in each reader's time zoneEvent broadcasts
%USER_COUNT%The interested-member count Discord sentEvent broadcasts
%YEAR%The current yearAnti-raid membership gate, role messages, scheduled posts, message proxies, mapped webhooks

%YEAR% uses UTC everywhere except scheduled posts, which use the rule's time zone 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 replacements 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 page 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 webhook's message uses webhook variables written as @ID@, filled from fields in each request's JSON. Signed Webhooks explains each variable type.