BuildcordDocs

Blueprint

The compiled form of a bot, and the checks every deploy goes through.

The builder stores your flows as drawings: nodes with positions and wires between handles. The runtime doesn't read drawings. When you deploy, Buildcord compiles every enabled flow into a blueprint, and the runtime executes that.

A blueprint is immutable and versioned. A run records the version it started on and finishes on it.

Shape

FieldWhat it holds
formatThe format's own version, currently 1.
botId, builtAtWhich bot, and when it was compiled.
intents, privilegedIntentsGateway intents the handlers need. Privileged ones are listed apart so the builder can flag them.
permissionsDiscord permissions the bot needs, for its invite link.
requiresGatewayWhy the bot can't run on the commands-only plan. Empty means it can.
commandsSlash commands to register with Discord, each naming its handler.
handlersOne for each flow.
embeds, components, modalsThe designs steps refer to by ID.
variables, collectionsDeclarations only. Values live in the data store.

Handlers and steps

A handler has an id that's stable across versions, a name, a trigger, an entry (the first step, or null) and a table of steps.

A trigger is one of:

TypeFields
commandname
eventevent
schedulecron
componentaction
callNone. Only another handler's flow.call runs it.

A step has:

FieldMeaning
opThe operation, the node's kind, such as message.reply.
argsThe settings, with defaults filled in.
nextEvery way out, and the step it leads to. Null ends the path.
resumePresent when the step pauses: component, modal or timer.
onErrorThe way out taken when the step throws.

Pausing

A step that pauses is saved to the data store under its resume key and takes no memory. A different process can wake it minutes or days later.

  • component: someone presses one of its buttons or picks from its menu.
  • modal: someone submits its form.
  • timer: its wait runs out.

Checks

Every deploy goes through two passes.

  1. Shape. The document is checked against the blueprint's JSON Schema.
  2. References. Everything a schema can't see: a step that leads to one that doesn't exist, a button whose action no flow runs, a bad cron expression, a command whose handler is missing.

Each problem is an error or a warning. Errors block a deploy. Warnings are worth a look but ship. The lint notch in the builder shows them as you work.

Common warnings include a command flow that no command registers and a sub-flow that nothing calls.

On this page