Introduction
ZBR is a scripting language for Discord bots. You write commands as plain .zbr files using ZBR functions, no boilerplate, no event handlers, no framework knowledge required.
Core Architecture
ZBR is a high-performance execution engine built in Rust, packaged as a convenient npm CLI.
- The CLI (
zbr): Acts as your project manager and binary launcher. - The Engine: A bundled Rust binary that handles the Discord gateway, parses your
.zbrfiles, and executes logic in real-time. - Hot Reloading: The engine watches your
commands/folder. Save a.zbrfile, and the changes are live instantly without restarting.
Commands are plain text files. Each file has a header section (lines starting with #) that defines the trigger, name, and type, followed by the ZBR code that runs when the command is invoked.
Quick Start
Get started with ZBR in seconds:
# Install ZBR
npm install -g @zbrlang/zbr
# Initialize a new project
zbr init my-bot
cd my-bot
# Start the bot
zbr runFunction Library
ZBR comes with over 400+ built-in functions covering everything from embeds and moderation to HTTP requests and JSON parsing.