Link Search Menu Expand Document

Templates

Templates are used to customize the messages that appear in raids and announcements. In this way, you can add some data that is not shown by default, such as the maximum CP or the types of the Pokémon, or you can also change the arrangement of the existing elements.

There are two completely independent templates: the raid template, which is changed with /raidtemplate, and the announcement template, which is changed with /announcetemplate. Also, raids can have content after the target list, which can be set with /raidfootertemplate.

By putting those commands without arguments, the current template code is displayed. To change a template, you can copy and paste that code with the desired modifications. For example:

/raidtemplate <b>{Pokemon}</b> Raid {{on <b>{weekday_day_month}</b> }}at {timewarn_icon_}<b>{raidtime}</b> in {gym_icon}{gym}<br>{{<em>Available from {opentime} to {endtime}</em><br>}}<em>Organized by </em>{organizer}{_edited_icon}{_refloated_icon}

To return to the default template, you must put a dash -, as follows:

/raidtemplate -

⚠️ Is everything very confusing? Start by putting the command /raidtemplate and look at the current raid template. Copy, paste it and make a little modification. Little by little, try new stuff.

Predefined templates

In addition to the default template, there are some additional predefined templates. To use them, you must specify their name instead of putting the complete template. For example:

/raidtemplate maxcp
/announcetemplate maxcp

The available predefined templates are:

Name Description
maxcp Like the default template, but also shows the Pokémon’s maximum CP.
pokebattler Like the default template, but with a link to Pokébattler in the Pokémon’s name.
pokebattler_maxcp The combination of the two previous templates: shows the maximum CP and a link to Pokébattler in the name of the Pokémon.

Variables

In any template you will find text between brackets {} that are variables that will later be replaced by the data of the raids and announcements. For example, {gym} is replaced by the name of the gym, with a link if the location is known.

This list indicates all the available variables. Some are already used in the default template or in one of the predefined templates, but others are not. For clarity, the brackets {} do not appear in the list.

Variable Description HTML
pokemon The Pokémon or the egg. -
pokemon_gamepress The Pokémon (with a link to its guide on Gamepress) or the egg. Link
pokemon_gameinfo The Pokémon (with a link to its guide on Gameinfo) or the egg. Link
pokemon_pokebattler The Pokémon (with a link to its guide in Pokebattler) or the egg. Link
expokemon_icon The EX icon only if it is an EX Raid Boss. -
shinypokemon_icon The shiny icon only if it is a raid boss that can appear shiny. -
maxcp The maximum CP at level 20. -
maxcp_boosted The maximum CP at level 25. -
types The types of the Pokémon (in icons). -
types_text The types of the Pokémon (in text). -
weatherboosts The climates that empower the Pokémon (in icons). -
weatherboosts_text The climates that empower the Pokémon (in text). -
gym The gym, with a link to the location if recognized. Link
gym_icon The location icon. -
exgym_icon The EX icon only if it is an EX gym. -
zone The area or areas of the gym. -
announcer Trainer who created the ad. Link
organizer Trainer who has organized the raid. Link
weekday_day_month Day of the week, day and month if the raid is not today. -
weekday_day Day of the week and day if the raid is not today. -
day_month Day and month if the raid is not today. -
opentime Time of the egg’s hatch. You can force a 0 in the first position if the time is a single digit by adding 0 to the beginning of the variable: 0opentime. -
lopentime Time of the egg’s hatch with a link to a local time converter. You can force a 0 in the first position if the time is a single digit by adding 0 after the leading l: l0opentime. Link
endtime Time of the raid’s boss despawns. You can force a 0 in the first position if the time is a single digit by adding 0 to the beginning of the variable: 0endtime. -
lendtime Time of the raid’s boss despawns with a link to a local time converter. You can force a 0 in the first position if the time is a single digit by adding 0 after the leading l: l0endtime. Link
raidtime Time of the raid. You can force a 0 in the first position if the time is a single digit by adding 0 to the beginning of the variable: 0raidtime. -
lraidtime Time of the raid with a link to a local time converter. You can force a 0 in the first position if the time is a single digit by adding 0 after the leading l: l0raidtime. Link
raidtime_europe/london Time of the raid in a different time zone than the one configured in the group, in this example that of Europe/London. You can put any valid IANA time zone. The time zone of your group must be configured before. You can force a 0 in the first position if the time is a single digit by adding 0 to the beginning of the variable, for example, 0raidtime_europe/london. -
lraidtime_europe/london Time of the raid in a different time zone than the one configured in the group, in this example that of Europe/London, with a link to a time converter to local time. You can put any valid IANA time zone. The time zone of your group must be configured before. You can force a 0 in the first position if the time is a single digit by adding 0 after the leading l, for example, l0raidtime_europe/london. -
timewarn Text close soon if the raid organization time is very close to closing time. -
timewarn_icon ⚠️ icon if the raid organization time is very close to the closing time. -
edited_icon 📝 icon if edited. -
edited Text edited if it is edited. -
refloated_icon Icon 🎈 if it is refloated. -
refloated Text refloated if it is refloated. -
note Text note usually added by an administrator or the raid organizer. If it is not specified in the template, it will be automatically added in the footer of the raid in case of adding a note. -
trainerscount The text with the registered trainers count and the corresponding subtotals, according to the group’s configuration. If not specified in the template, it will be automatically added just above the list of targeted trainers. -

Format with HTML

Templates can be formatted with plain HTML, with the usual Telegram restrictions:

  • Valid tags are <i></i> (italics),<b></b> (bold), <u></u> (underlined),<s></s> (crossed out), <code></code> (fixed-width text) and <a href=""></a>(link).
  • If you want the characters &lt;, &gt; and &amp; to be seen, the entities &lt;, &gt; and &amp; must be used.
  • You can put, for example, bold and underlined text at the same time, nesting the labels correctly. <u><b>Good</b></u> is correct, but <u><b>Bad</u></b> is wrong and will not work
  • Line breaks should be indicated with <br>. You can separate the elements by putting several in a row, for example <br><br>.

Remember that you are specifying code for the template, and the format that you apply directly will be ignored. That is, if you want something to be shown in bold, you must put it <b>this way</b>, but not use the bold option integrated in Telegram.

Variants of variables

To help build better messages there are versions of the variables with spaces at the beginning, with spaces at the end, in capital letters… These are the available variants:

  • {VARIABLE}: contains {variable} in uppercase.
  • {Variable}: contains {variable} forcing the first capital letter.
  • {_variable}: Contains {variable} with a leading space.
  • {variable_}: contains {variable} with a space at the end.
  • {_variable_}: contains {variable} with a space at the beginning and at the end.

Variables that put Link in the HTML column contain links. That is, {pokemon_gameinfo} will be displayed as the name of the Pokémon with a link to Gameinfo.

This type of variable can be decomposed to independently display only the text, adding _text at the end, or just the URL, adding _link at the end.

For example, the variable {pokemon_gameinfo_text} will contain the text with the name of the Pokémon and {pokemon_gameinfo_link} will contain the URL.

Conditional blocks

There are three types of conditional blocks, which are blocks enclosed in double braces {{ }} that can be shown or hidden depending on simple conditions.

The simplest conditional block is written like this: {{text}}. It will only be displayed if all the variables used within are defined. You have examples of this type of block in the default template, where only a portion of text is shown if the variable weekday_day_month is defined and another if opentime and endtime are defined.

Another type of conditional block allows text to be displayed only if a variable is defined, without the variable being printed. The [variable]{{text}} syntax allows you to print all the text if the variable exists. For example, to display a text only if a raid is EX, you can use this conditional block:

[expokemon_icon]  

Finally, you can do just the opposite with the third type of conditional block: show a text if the variable is not defined. The syntax for this is [variable]{{text}}. For example, to display a text only in case a raid does not have the gym location correctly defined:

[!gym_link] 

Variables to use in conditional blocks

All the variables described in the table above can be used as conditions. In case they have a defined value, the condition will be true. In case they do not have a defined value, the condition will be false.

In addition, there are some variables specially indicated to use as conditions, which do not print anything even if they are true:

Variable Description
isegg True if it is an egg.
ispokemon True if it is a raid boss.
istier5 True if it’s a level 5 boss or egg. Also available for all other levels.
hasforms True if the Pokémon has globally defined forms (one or more).
ismissingform True if the Pokémon has globally defined forms (one or more) but was not chosen in the raid.
timenearopen True if the raid organization time is less than 12 minutes from the hatching time. Also available timenearend, timefaropen, timefarend and timeverynearend (like timenearend but less than 6 minutes).
pendinginvites True if there are requests for invitations pending acceptance.
maxjoined True if the maximum number of face-to-face trainers configured in the group has been reached.
maxtotal True if the maximum total number of trainers configured in the group has been reached.
maxremote True if the maximum number of remote trainers configured in the group has been reached.
maxinvited True if the maximum number of guest trainers configured in the group has been reached.
maxgametotal True if the maximum total number of trainers has been exceeded based on the limit in the game, regardless of the group configuration.
maxgameremote True if the maximum number of remote trainers has been exceeded based on the limit in the game, regardless of the group setting.
raidpending True if the raid has not yet taken place, or if it is taking place but has not been manually closed, the egg has not despawned, or a reasonable amount of time has passed since the scheduled time.
raidended True if the raid has been closed manually, or the egg has despawned, or a reasonable amount of time has passed since the scheduled time.
raidcancelled True if the raid has been canceled.

Servers can be paid monthly thanks to the generous donations from this people and others. Even small donations help keep the server costs, so please cosider making a donation in Patreon: Tina Arroyo, Pokémon Go Tarragona, nunesrd, RAMeow, Jordi2908, CosladaGO, Incursiones Tenerife Norte, PoGo Areeiro, JosePQ24, Gcg93ZoNe, Rodrigomerakoi, TFalkenLop, RaidsAveiro, Raids PoGo Expo, PikaEle18, iF0RG0T, DarkNacKeN, chbcn, Craudiaum, Go Vallecas, Eleita, CidHigh, Pilfer, M4WD5L3Y, itsnursejessi, Hoppuz, RedKz4