K
Docs
API ReferencePiecesCondition
🔀

Condition

base.conditionBase SetLogic

The decision maker! Checks if something is true or false, then sends the flow down one of two paths. It's how your bot becomes smart — 'if this user is an admin, do X, otherwise do Y'.

When to use this
  • Use ∅ is empty to branch when an optional spell input wasn't filled in — e.g. {{input.options.reason}}
  • Use {{input.user.id}} to compare against who ran the command
  • Use "ignore case" variants so "Admin" and "admin" both match
  • Use "starts with" for prefix commands — e.g. {{message.content}} starts with !

On the canvas

This is what Condition looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🔀
Condition
base.condition
Logic
leftrequired
{{user.roles}}
operatorrequired
select
rightrequired
admin
true
false

Config fields

FieldTypeReqWhat it does
left
{{user.roles}}
textyesCheck this value 🔍
operatorselectyesUsing this rule ⚖️
right
admin
textyesAgainst this value 🎯

Output ports

trueTaken when the condition passes
falseTaken when the condition fails

Connect each port to a different downstream node. Use base.merge if both branches should rejoin after.

📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
if (score >= 100) {
  // true branch
} else {
  // false branch
}
// Kitcord maps operators (eq, contains, matches, …) to the same if/else split