diff --git a/functions.go b/functions.go index 99d990f3..ad53fc3c 100644 --- a/functions.go +++ b/functions.go @@ -61,4 +61,5 @@ func init() { tplFuncs.Register("toLower", genericTemplateFunctionGetter(strings.ToLower)) tplFuncs.Register("toUpper", genericTemplateFunctionGetter(strings.ToUpper)) tplFuncs.Register("followDate", genericTemplateFunctionGetter(twitch.GetFollowDate)) + tplFuncs.Register("concat", genericTemplateFunctionGetter(func(delim string, parts ...string) string { return strings.Join(parts, delim) })) } diff --git a/wiki/Home.md b/wiki/Home.md index 553774e3..295e1832 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -144,6 +144,7 @@ Additionally there are some functions available in the templates: - `arg ` - Takes the message sent to the channel, splits by space and returns the Nth element - `channelCounter ` - Wraps the counter name into a channel specific counter name including the channel name +- `concat <...parts>` - Join the given string parts with delimiter - `counterValue ` - Returns the current value of the counter which identifier was supplied - `displayName [fallback]` - Returns the display name the specified user set for themselves - `fixUsername ` - Ensures the username no longer contains the `@` or `#` prefix