✒️
Format Text
base.formatBase SetUtilityConstructs a piece of text by filling in a template with live values. Combine static text with Sparks to build dynamic messages, labels, or anything that needs to be assembled from parts.
When to use this
- →Drop any ✨ Spark into the template using {{sparkName}}
- →Great for building complex strings before passing them to a Reply or Send Embed
On the canvas
This is what Format Text looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
✒️Utility
Format Text
base.formattemplaterequired
🏅 {{user.name}} has {{result.0.coins}} coins! Nice!
asrequired
formatted (becomes a Spark!)
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
template🏅 {{user.name}} has {{result.0.coins}} coins! Nice! | textarea | yes | The template 📝 |
asformatted (becomes a Spark!) | text | yes | Name the result ✨ |
Sparks this piece adds
After this piece runs, these values are available as sparks in every node downstream.
{{formatted}}stringFormatted textOutput ports
outputMoves on with the formatted text available as a Spark
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const line = `#1. ${player.name} — ${player.coins} coins`;
// Template: "#{{rank}}. {{player.name}} — {{player.coins}} coins"More Utility pieces