Message Templating Engine

A powerful and useful templating engine to have more control over the messages you are sending with Betsy

How does it work?

Anytime you send a message through Betsy the message will be interpreted by our templating engine which will format the message before it is sent to discord. Allowing you to do various things like inserting a time, date, parameter, and so much more.

How to use it?

In order to tell the templating engine that you have something in your message that needs to be formatted you must include a template instruction, OR an empty template instruction (${}) inside the CONTENT of a message. Empty template instructions are replaced with an empty string so they are not sent in the final message.

Simply include our templating tag anywhere into the discord message and watch the magic happen. For example lets say you want to have a formatted date time that is 3600 seconds (1 hour) in the future. Anywhere in your message simply add <t:${time:3600}> to show a formatted date in the future.

This example will make use of the Discord Date Time Formatting Feature https://c.r74n.com/discord/formatting#Timestamps

Available Templating Functions

time

This will generate the current epoch time, and accepts a parameter which is how many seconds in the future you want to add.

Example ${time:0} - The current time

Example ${time:60} - One minute in the future

keyValue

This will pull a stored value into the message template.

Example: ${keyValue:testCategory:testKey} In the below image example this will fill in "Some Awesome Value" into that space.

keyValueCategory

This will pull a stored value into the message template.

Example: ${keyValueCategory:testCategory} In the above image example this will fill in "Some Awesome Value" into that space.

NOTE: If Mark Used On Fetch is turned on it will grab the next UNUSED key value pair.

ticketUser

When the message is sent within a ticket channel this will replace the templating engine instruction with a mention to the user.

Example: ${ticketUser}

ticketChannel

Can only be used in the Interaction Response for a Ticket Channel. Used to provide a link to the channel that is created for the ticket interaction response.

Example: ${ticketChannel}

Last updated