Skip to content

Helpers on this page: {text.*}.

These helpers change a text: letter case, style, words, length, replacing, encoding and plurals. Put the input after a colon, as in {text.upper:hello}. Separate more than one input with a pipe. Most helpers take the text first. Some take a number first, as in {text.first:3|hello}, so follow the order in each example. A text input keeps its spaces exactly as you type them. An input that is a number or a setting ignores the spaces around it. To write a space on purpose, you can also type a backslash and s.

Start with a small transformation

Text helpers change the value you give them before it appears in the reply. {text.upper:hello chat} gives HELLO CHAT; {text.upper:{args}} applies the same operation to the words after a command. The nested helper supplies the input, so you can change the presentation without asking viewers to type capitals themselves.

For a short display, {text.cut:hello world|max=8|end=...} gives hello.... The maximum includes the ending, so the final text fits in eight characters. The table distinguishes this from helpers that append an ellipsis after taking a specified number of characters or words.

The examples illustrate possible values; your results depend on the channel and trigger. Use in lists the template fields that accept each helper. A pipeline still needs a trigger that supplies the relevant person, message, or event; event-specific helpers need that event. For viewer-written text, the Viewer Templates setting and permissions also apply.

When a helper cannot use its input

A helper that cannot use its input stays in the reply as written. These inputs cause it:

  • The wrong number of inputs.
  • A count, width or length that is not a whole number from 0 to 1000, in every helper that takes one. The plural helpers are the exception: {text.plural}, {text.plural.count} and {text.plural.auto} take any whole number, negative ones too.
  • A position below 1. Positions count from 1, and a position past the end gives empty text.
  • An empty text to find, in {text.count}, {text.remove}, {text.replace} and {text.censor}.

{text.count}, {text.remove} and {text.replace} match letter case exactly. {text.censor} and {text.replace.icase} ignore letter case. In a viewer’s own text, a repeat count and a pad or center width above 20 are cut to 20, so {text.repeat:30|ha} gives 20 copies.

Letter case and styles

HelperWhat it givesExampleUse in
{text.alternating}Alternates upper and lower case, starting with upper{text.alternating:hello} gives HeLlOCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.bold}The text in bold letters{text.bold:hi} gives 𝐡𝐢Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.bubble}The text in circled letters{text.bubble:hi} gives ⓗⓘCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.camel}The text in camelCase{text.camel:hello big world} gives helloBigWorldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.capitalize}Capitalizes the first letter and keeps the rest as written{text.capitalize:hello world} gives Hello worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.clap}The words of the text with a clap between them{text.clap:big world} gives big 👏 worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.decapitalize}Lowercases the first letter and keeps the rest as written{text.decapitalize:Hello} gives helloCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.fullwidth}The text in wide full-width letters{text.fullwidth:hi} gives hiCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.hashtag}The text as a #Hashtag{text.hashtag:big world} gives #BigWorldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.italic}The text in italic letters{text.italic:hi} gives 𝘩𝘪Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.kebab}The text in kebab-case{text.kebab:Hello Big World} gives hello-big-worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.leet}The text in leet speak{text.leet:leet} gives l337Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.lower}Makes the text lowercase{text.lower:HeLLo} gives helloCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.mocking}Alternates lower and upper case, starting with lower{text.mocking:hello} gives hElLoCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.monospace}The text in monospace letters{text.monospace:hi} gives 𝚑𝚒Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.pascal}The text in PascalCase{text.pascal:hello big world} gives HelloBigWorldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.plain}Fancy letters turned back to plain letters{text.plain:𝐡𝐢 ⓗⓘ} gives hi hiCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.rot13}The text with every letter moved 13 places (ROT13){text.rot13:hello} gives uryybCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.script}The text in script letters{text.script:hi} gives 𝒽𝒾Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.sentence}Lowercases the text and capitalizes the start of each sentence{text.sentence:hello WORLD. bye} gives Hello world. ByeCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.slug}The text as a web-safe slug, like hello-big-world{text.slug:Hello Big World!} gives hello-big-worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.smallcaps}The text in small capitals{text.smallcaps:hello} gives ʜᴇʟʟᴏCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.snake}The text in snake_case{text.snake:Hello Big World} gives hello_big_worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.spaced}Puts a space, or your own separator, between every character{text.spaced:hype| . } gives h . y . p . eCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.spongecase}Alternates lower and upper case across the letters, like a mocking meme{text.spongecase:hello world} gives hElLo WoRlDCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.squared}The text in squared capital letters{text.squared:HI} gives 🄷🄸Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.strike}The text with a line through it{text.strike:hi} gives h̶i̶Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.stutter}The text with a stuttered first letter{text.stutter:hello} gives h-helloCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.superscript}The text in small raised letters{text.superscript:hi} gives ʰⁱCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.swapcase}Swaps upper and lower case letter by letter{text.swapcase:Hello} gives hELLOCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.title}Capitalizes every word and lowercases the rest{text.title:big world} gives Big WorldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.underline}The text with an underline{text.underline:hi} gives h̲i̲Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.upper}Makes the text UPPERCASE{text.upper:hello} gives HELLOCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.upsidedown}The text turned upside down{text.upsidedown:hello} gives ollǝɥCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.uwu}The text in uwu speak{text.uwu:really} gives weawwyCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.yell}The text in capitals with an exclamation mark{text.yell:hello} gives HELLO!Commands, event responses, timers, pipelines, Discord, webhooks, viewer text

Words, letters and length

HelperWhat it givesExampleUse in
{text.center}Pads both sides of the text to a width with a character (a space by default){text.center:hi|6|*} gives **hi**Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.chars.count}Counts the characters in the text{text.chars.count:hello} gives 5Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.chars.shuffle}The characters in a random order{text.chars.shuffle:abc} gives bcaCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.count}Counts how many times a text appears in the text{text.count:banana|a} gives 3Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.cut}Cuts the text to a maximum length, the ending included: text, max=number, end=text. The max is required. The end is optional and is an ellipsis when you leave it out{text.cut:hello world| max = 8 |end=...} gives hello...Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.cut.words}Keeps the first number of words and adds an ellipsis when it cut{text.cut.words:hello big world|2} gives hello big…Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.first}The first characters of the text{text.first:3|hello} gives helCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.initials}The first letter of every word, in capitals{text.initials:big world} gives BWCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.last}The last characters of the text{text.last:3|hello} gives lloCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.length.fit}The text cut to a length, with no ending mark{text.length.fit:hello|3} gives helCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.letters}Only the letters of the text{text.letters:a1b2} gives abCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.letters.count}Counts only the letters in the text{text.letters.count:a1 b2} gives 2Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.lines.count}Counts the lines in the text. Type a backslash and n where a line ends{text.lines.count:a\nb} gives 2Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.lines.first}The first line of the text. Type a backslash and n where a line ends{text.lines.first:a\nb} gives aCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.lines.join}The lines of the text joined with a separator, one space when you give none. Type a backslash and n where a line ends, then a pipe and the separator{text.lines.join:a\nb|\s/\s} gives a / bCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.lines.wrap}Wraps the text at a width and joins the lines with a slash{text.lines.wrap:aaa bbb ccc|7} gives aaa bbb / cccCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.pad.left}Pads the start of the text to a width with a character (a space by default){text.pad.left:7|3|0} gives 007Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.pad.right}Pads the end of the text to a width with a character (a space by default){text.pad.right:ab|4|.} gives ab..Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.repeat}Repeats the text a number of times, with an optional separator as the third input{text.repeat:3|ha|-} gives ha-ha-haCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.reverse}Reverses the text character by character{text.reverse:abc} gives cbaCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.reverse.words}Reverses the order of the words{text.reverse.words:hello big world} gives world big helloCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.squish}Trims the text and turns every run of spaces into one space{text.squish:a b c} gives a b cCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.substring}A part of the text from a position, counting from 1, with a length{text.substring:2|3|hello} gives ellCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.trim}Removes spaces from the start and the end{text.trim: hi } gives hiCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.truncate}Cuts the text to a number of characters and adds an ellipsis when it cut{text.truncate:5|hello world} gives hello…Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.word}The word at a position, counting from 1{text.word: 2 |big world} gives worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.word.first}The first word of the text{text.word.first:hello big world} gives helloCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.word.last}The last word of the text{text.word.last:hello big world} gives worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.word.longest}The longest word of the text{text.word.longest:hi hello yo} gives helloCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.word.random}One random word of the text{text.word.random:a b c} gives one of a, b or cCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.count}Counts the words in the text{text.words.count:hello big world} gives 3Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.first}The first number of words{text.words.first:2|hello big world} gives hello bigCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.from}All words from a position to the end, counting from 1{text.words.from:2|hello big world} gives big worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.last}The last number of words{text.words.last:2|hello big world} gives big worldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.range}The words from one position to another, both included{text.words.range:1|2|hello big world} gives hello bigCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.shuffle}The words in a random order{text.words.shuffle:a b c} gives c a bCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.sort}The words in alphabetical order{text.words.sort:c a b} gives a b cCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.words.unique}The words with repeated words removed{text.words.unique:a b a} gives a bCommands, event responses, timers, pipelines, Discord, webhooks, viewer text

Replace, encode and grammar

HelperWhat it givesExampleUse in
{text.article}A word with a or an in front. On a channel in another language it gives the word back unchanged{text.article:apple} gives an appleCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.base64.decode}A base64 text turned back to plain text{text.base64.decode:aGk=} gives hiCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.base64.encode}The text encoded as base64{text.base64.encode:hi} gives aGk=Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.censor}The text with a word replaced by stars, ignoring letter case{text.censor:you noob|noob} gives you ****Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.digits}Only the digits of the text{text.digits:a1b22} gives 122Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.escape.chat}The text made safe so chat does not run it as a command{text.escape.chat:/ban x} gives ⁄ban xCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.html.strip}The text without HTML tags{text.html.strip:<b>hi</b>} gives hiCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.join.and}A list of items joined with commas and the word and (en on a Dutch channel){text.join.and:a|b|c} gives a, b and cCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.join.or}A list of items joined with commas and the word or (of on a Dutch channel){text.join.or:a|b|c} gives a, b or cCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.links.strip}The text without links{text.links.strip:see https://a.b now} gives see nowCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.mask}The text with all but the last characters replaced by stars{text.mask:secret|2} gives ****etCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.mentions.strip}The text without @mentions{text.mentions.strip:@ViewerTwo hi} gives hiCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.paren}Puts the text between parentheses{text.paren:hi} gives (hi)Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.path.encode}The text escaped for one part of a link path{text.path.encode:a/b c} gives a%2Fb%20cCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.plural}The singular word for 1 or -1, the plural word for any other whole number{text.plural:3|sub|subs} gives subsCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.plural.auto}A word in its plural form, unless the number is 1 or -1{text.plural.auto:2|box} gives boxesCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.plural.count}The number with its singular or plural word{text.plural.count:3|sub|subs} gives 3 subsCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.possessive}A name in its possessive form, like James’ or Anna’s{text.possessive:James} gives James'Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.query.encode}The text escaped for a link query, with + for spaces{text.query.encode:a b} gives a+bCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.quote}Puts the text between double quotes{text.quote:hi} gives "hi"Commands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.remove}Removes every match of a text{text.remove:hello world|o} gives hell wrldCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.replace}Replaces every match of a text with another text{text.replace:a-b|-| + } gives a + bCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.replace.first}Replaces only the first match of a text with another text{text.replace.first:a a a|a|b} gives b a aCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.replace.icase}Replaces every match of a text with another text, ignoring case{text.replace.icase:Hello|hello|bye} gives byeCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.singular}A word in its singular form{text.singular:boxes} gives boxCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.url.decode}A link-escaped text turned back to plain text{text.url.decode:a%20b} gives a bCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.url.encode}The text escaped for use in a link{text.url.encode:a b&c} gives a%20b%26cCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.vowels.remove}The text without vowels{text.vowels.remove:hello} gives hllCommands, event responses, timers, pipelines, Discord, webhooks, viewer text
{text.wrap}Puts a left mark before the text and a right mark after it{text.wrap: hi |[|]} gives [ hi ]Commands, event responses, timers, pipelines, Discord, webhooks, viewer text

Back to Template helpers. For the places helpers work, special characters and HTML, read Variables and templates.