Guides

Scripting Overview

Scripts let you build custom logic on top of FaustBot triggers and actions. Use them to react to events, call APIs, and glue integrations together.

Overview

Every script runs inside the FaustBot runtime and has access to the CPH API. You can read variables, send messages, control integrations, and build reusable utilities that power your stream.

Trigger-driven

Run scripts from chat commands, alerts, schedules, or custom events.

Integration-aware

Call CPH methods to control OBS, Discord, lighting, and more.

Reusable

Store shared logic as global scripts and call them from actions.

Supported Languages

Python

Recommended

Fast to write, great for quick automation and prototypes.

Lua

Recommended

Lightweight scripting with low overhead.

JavaScript

Ideal for web-focused workflows and JSON-heavy automation.

C#

Best for larger logic and reusable libraries.

View guide

C++ / WASM

Maximum performance and advanced tooling.

View guide

Typical Workflow

1

Choose a Trigger

Start with the event that should launch your script.

2

Write the Logic

Use CPH calls to read data, call integrations, or set variables.

3

Test and Iterate

Run the script in a test action before going live.

Next Steps