Triggering this event registers an HTML template that chat:addMessage can
reference by ID through the message’s template field, instead of sending
raw HTML with every message.
Event Name
chat:addTemplateParameters
- string templateID: Identifier used to reference the template from
chat:addMessage - string htmlString: The template’s HTML, with
{0},{1}, … placeholders filled from the message’sargs
Example
TriggerEvent('chat:addTemplate', 'tweet', "<b>{0}</b>: {1}")
TriggerEvent('chat:addMessage', {
templateId = 'tweet',
multiline = true,
args = { 'Blu', 'tianshee was mean to me today' }
})