Templates
Custom Message Templates
Custom message templates allow you to specify how your Discord event messages are formatted and which data fields are included.
Reminder Message Templates
The reminder message template is used for scheduled reminders, as well as notifications for newly created, updated, or cancelled events. A default template layout is typically used, but this can be customized by creating and assigning a new Reminder Template.
When building a custom Reminder Template you can insert a variety of special data fields which the bot uses to determine where to insert the desired data. To use a data field it must be enclosed in a double set of curly braces, for example if you wanted to insert the event's title you would type:
{{.Title}}
Standard Event Data Fields
The following are a list of the standard event data fields retrieved from your connected external calendar. Some of these fields may be blank if your external calendar doesn't support them.
Field | Type | Description |
---|---|---|
.Title | string | Event Title |
.Description | string | Event Description |
.StartTime | datetime | Timestamp of when the event is set to begin |
.Endtime | datetime | Timestamp of when the event is set to end |
.LastUpdate | datetime | Timestamp of when the event was last edited in the external calendar |
.Location | string | Location of the event as specified in the external calendar event's Location field (if available) |
.EventCalendarLink | url | URL to the event in the external calendar (if available) |
.ConferenceLink | url | URL to the event's virtual conference link (if available) |
.CalendarName | string | Name of the external calendar where this event resides |
.Status | string | Current status of the event (e.g. "active" or "cancelled") |
Generated Data Fields
Generated data fields are not retrieved from your external calendars, but are instead derived data. These are a combination of notifier settings and bot status fields generated while processing your events.
Field | Type | Description |
---|---|---|
.EventLink | url | Primary event URL determined by searching all available options and using the notifier's Event Link setting |
.DiscordEventLink | url | URL to the associated Discord Event (if it exists) |
.Duration | string | Duration of the event (e.g. "30 minutes" or "2 hours") |
.Mentions | string | All role mentions in Discord's formatting |
.MessageReason | string | Reason for why this message is being sent |
.MessageReasonIcon | url | URL of the icon associated with the reason this message is being sent |
.StartingInText | string | Static text of when this event will begin (e.g. "Starting in 45 minutes") |
Front Matter Data Fields
Front matter data fields are a one-to-one mapping of the Event Front Matter keys which can be set inside of an event's description.
Field | Type | Description |
---|---|---|
.Frontmatter.Cover | url | URL of the png or jpg image to be used as the cover of the Discord Event |
.Frontmatter.Thumbnail | string | URL of the thumbnail image to be used in the reminder message |
.Frontmatter.EmbedImage | url | URL of the image to be used in the reminder message |
.Frontmatter.EventLocation | string | Location to be used for the Discord Event |
.Frontmatter.Location | string | Location override to the event's location |
.Frontmatter.LocationFromDescription | url | URL pulled from the event's description (if enabled) |
.Frontmatter.ReminderLink | url | URL to be used in reminder messages |
.Frontmatter.SummaryLink | url | URL to be used in summary messages |
.Frontmatter.Tags | string | Tags set for filtering |
Template Functions
Template functions are helpers which can take the data field(s) you provide, process them, and produce an output. Functions need to be surrounded by double curly braces, like data fields, but they are followed by their parameters. For example a template function exampleFunction
which takes two parameters would be written as:
{{exampleFunction param1 param2}}
The table below explains each of these functions, their parameters, and provides an example usage.
Functions | ||||
---|---|---|---|---|
discordDateTime datetime format
The Example Usage: {{discordDateTime .StartTime "F"}} |