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.
Choose Your Development Path
ZBR provides two ways to build your bot:
- Webapp Editor (Beta): A visual, web-based environment. Ideal for rapid prototyping, managing variables, and testing command logic without needing a local setup. Export your bot as a project ZIP to run it locally.
- CLI (
zbr): The primary tool for development, production hosting, and managing your bot’s lifecycle. Bots created with either method can be deployed to any hosting platform of your choice.
Core Architecture
ZBR is powered by a high-performance runtime engine built in Rust.
- 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
Option 1: Webapp Editor (Beta)
- Head over to the ZBR Webapp.
- Create or import your bot project.
- Build your commands, manage variables, and tweak settings visually.
- Export your project as a ZIP, then follow the local CLI instructions below to host it.
Option 2: CLI (Recommended)
Get started with ZBR in seconds:
# Install ZBR
npm i @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.