Templating
A guide to the Chatter message template syntax
To take advantage of Chatter to its fullest, the message template syntax should be understood. Most add-ons will allow you to write custom messages. For example, you may wish to reference the player's name or substitute the current date & time.
Syntax
A token is a fixed name that is replaced with its actual value. In order to prevent unintentional replacements, we wrap the token name with ${
and }
.
For example, say we are allowed to substitute the player's name into our message, and the token name is described as player
. We can just add ${player}
anywhere in our message!
If a token accepts formatting arguments, we can add them after a colon, e.g. ${token:format here}
.
Types
Plain Text
There is nothing fancy here, just use ${token}
.
Duration
By default, a duration token of ${duration}
will use words. However, you can customise the format, e.g.
Symbol
Meaning
Examples
y
years
0
M
months
0
d
days
1
H
hours
17
m
minutes
30
s
seconds
59
S
milliseconds
314
'
escape for text
'custom text'
Date & Time
To use a date & time token, you'll need to specify the format, e.g.
Symbol
Meaning
Examples
yyyy
year-of-era
2004
yy
year-of-era
04
MMMM
month-of-year
July
MMM
month-of-year
Jul
MM
month-of-year
07
M
month-of-year
7
dd
day-of-month
04
d
day-of-month
4
EEEE
day-of-week
Tuesday
EEE
day-of-week
Tue
ee
day-of-week
02
e
day-of-week
2
a
am-pm-of-day
PM
hh
clock-hour-of-am-pm (1-12)
08
h
clock-hour-of-am-pm (1-12)
8
HH
hour-of-day (0-23)
00
H
hour-of-day (0-23)
0
mm
minute-of-hour
02
m
minute-of-hour
2
ss
second-of-minute
07
s
second-of-minute
7
SSS
fraction-of-second
878
SS
fraction-of-second
88
S
fraction-of-second
9
'
escape for text
'custom text'
''
single-quote
'
Last updated
Was this helpful?