-
-
Notifications
You must be signed in to change notification settings - Fork 73
Content Manager Description Templates
Content Manager description templates make use of golang's templating language.
{{ .Track }} {{ with .TrackLayout }}({{ . }}){{ end }} - an event hosted by {{ .ServerName }}
{{ .EventDescription }}
{{ .ChampionshipPoints }}
{{ .CarDownloads }}
{{ .TrackDownload }}
You can use any of the elements inside the CurrentRaceConfig struct and the GlobalServerConfig struct (click the links for details).
On top of this you can use the custom template variables ({{ .EventDescription }}, {{ .ChampionshipPoints }}, {{ .CarDownloads }}, {{ .TrackDownload }} shown in the example above.
For example:
{{ .Track }} {{ with .TrackLayout }}({{ . }}){{ end }} - an event hosted by {{ .ServerName }}
Would show the following for an event at laguna seca:
ks_laguna_seca - an event hosted by Assetto Server Manager
Another example is:
{{ .ServerName }} - {{ .EventName }} {{ if eq .RaceExtraLap 1 }}This server will force you to drive another lap at the end of the race!{{ end }}
Discord Notification Templates also have access to anye elements inside the CurrentRaceConfig struct and the GlobalServerConfig struct (click the links for details). They also have access to the following custom variables:
- ServerName
- EventName
- NotificationContext (for example Started, Scheduled)
- Started, PracticeStarted, Scheduled, Unscheduled, Reminder (booleans linked to the Context)
- ScheduledDate (as a string)
- ReminderTime (as a string)
- CarList
All of these variables are used in the default templates so you can see how they work!