Changelog
All notable changes to the ZBR project are documented here.
v1.4.1 - Parser fix and Zupdate interaction
This release addresses a critical parser bug and introduces a new interaction feature for better message management in Discord.
Core
- Fixed Parser Data Loss — Resolved a bug in
parse_argwhere arguments containing multiple function calls (e.g., insideZif) were being truncated.
New Functions
Zupdate{}— Signals that an interaction (button/select menu) should update the original message instead of sending a new reply.ZspliceText{text;start;length;replacement}— Modifies a string by removing a specified number of characters and inserting new text.
v1.4.0 - Centralized error handling across all functions
All 390+ ZBR functions now share a single centralized error system in src/error_messages.rs. Every FnOutput::error() call uses the same formatting helpers, producing consistent Line N: Zfunction - message output everywhere.
Core
- 26 centralized error helpers —
too_few_args,expected_snowflake,expected_url,out_of_range,not_found,action_failed_reason,not_available, and more, all producing uniform error messages. - Every function updated — All 394+
FnOutput::errorcalls across the codebase now route throughcrate::error_messages::*. - Helper modules aligned —
math/helpers.rs(parse_f64/parse_i64),permissions/helpers.rs,audit/helpers.rs, andjson/helpers.rsall use the centralized system. src/error_messages.rsadded — single source of truth for error messaging.
v1.3.0 - In-process engine, automod, polls, soundboard, and utility functions
This release eliminates the HTTP runtime server, running the engine in-process for lower latency and simpler deployment. It also adds 5 new function categories and over 30 new functions.
Core
- Removed HTTP runtime server — The Axum-based HTTP server (
/runendpoint) is gone. Code execution now happens directly in-process via the newexecutormodule, eliminating network overhead and the need foraxum,tower, andtower-httpdependencies. - SSRF Protection — HTTP functions now validate URLs against a blocklist of private/reserved IPs and known dangerous hostnames before executing requests.
- Header Validation —
ZhttpAddHeaderblocks dangerous headers (cookie, host, connection, transfer-encoding, etc.) for security. - Auto Content-Type — HTTP requests with JSON-like bodies now auto-detect and set
Content-Type: application/jsonwhen no content type header is present. ZstartThreadnow accepts a 6thprivateargument to create private or public threads.- Commented-out
ZonlyForIDsguard added to the eval example command. - Added
url,base64,sha2,md-5dependencies.
New function categories
Automod
ZautomodRule, ZautomodRuleCreate, ZautomodRuleEdit, ZautomodRuleDelete, ZautomodRules
Alias: ZautomodRuleUpdate → ZautomodRuleEdit
Application Emojis
ZappEmojis, ZappEmojiCreate, ZappEmojiDelete
Polls
ZpollAddAnswer, ZpollAllowMultiselect, ZpollAnswerVoters, ZpollAnswerVotes, ZpollCreate, ZpollEnd, ZpollGet, ZpollSend
Soundboard
ZsoundboardCreate, ZsoundboardDefaultSounds, ZsoundboardDelete, ZsoundboardEdit, ZsoundboardPlay, ZsoundboardSound, ZsoundboardSounds
Utility
Zbase64Decode, Zbase64Encode, Zduration, Zentitlements, Zmd5, Zsha256, Zskus
New individual functions
Channel — ZsyncPerms
Forum — ZforumPostLock, ZforumPostPin
Message — ZpinList
Server — ZserverLockdown, ZserverModify, ZeditWelcomeScreen, ZwelcomeScreen
Sticker — ZstickerCreate, ZstickerEdit
Thread — ZthreadArchive, ZthreadList, ZthreadMetadata, ZthreadPin, ZthreadUnarchive
Voice — ZvoiceRequestToSpeak, ZvoiceStatus, ZvoiceSuppress
v1.2.0 - Bot owner fix, server/thread/voice functions, and CLI improvements
This release fixes bot owner resolution for team/group bots, adds new server/thread/voice functions, improves CLI command support, and expands project initialization.
Core
- Fixed
botOwnerIDso it returns the actual bot owner instead of the team ID when the bot is part of a team/group. - Added
version,list, andnew <type>CLI commands. - Updated
initto support creating a project in a new folder viainit <folder>. - Removed archived bot voice helper code from
archive/bot-voice.
Functions added
Server functions
serverChannels,serverRoles
Thread functions
threadArchived,threadLocked,threadParentID
Voice functions
voiceEmpty,voiceFull,voiceNew,voiceOld
v1.1.0 - Audit & Event Additions
This release adds a new audit-log function category and several gateway-based event triggers.
Audit
- Added a new
auditfunction category exposing functions:ZauditCount,ZauditEntries,ZauditLatest,ZauditEntryID,ZauditEntryUser,ZauditEntryAction,ZauditEntryTarget,ZauditEntryReason,ZauditEntryChanges
- Functions fetch and return guild audit log data via the Discord API (JSON output for structured fields).
Events
- Added new triggers:
onBotJoin,onBotLeave,onBoostAdd,onBoostRemove. onBotJoinandonBotLeavemap to runtime guild join/leave events and fire only for guilds the bot joins or leaves while online.- Boost event detection implemented via guild update comparisons of
premium_subscription_count.
v1.0.0 - Production Release
End of Alpha and the first stable production release. This version introduces the official ZBR CLI, automated installation, and multi-OS support.
CLI & Distribution
- New ZBR CLI — The entire engine is now managed via a unified global command:
zbr. - Project Initialization —
zbr initinstantly bootstraps a new project with a recommended folder structure, configuration files, and example scripts. - Unified Runner —
zbr runlaunches the high-performance Rust execution engine and starts your bot. - Multi-OS Support — Official support and pre-built binaries for Linux (x64), macOS (x64 & ARM64), and Windows (x64).
- Smart Installation — Distributed via npm with a tiny footprint; the CLI automatically downloads the correct binary for your system on install.
Alpha v5
Loop system, async execution, full voice channel coverage, scheduled events, forum channels, stage channels, stickers, invite management, regex, extended string and math utilities, and more.
Core
- Loop system —
Zrepeat{N;code}runs a code block N times (max 1000);ZforSplit{code}iterates over the current split text;ZforJson{key;...;code}iterates over a JSON array at a key path. All three are lazy-evaluated.ZloopIndex{}andZloopValue{}expose the current iteration state inside any loop body. - Async execution —
Zasync{name;code}spawns a named background task that runs the code block concurrently;Zawait{name}blocks until that task completes and returns its result. - Deferred execution —
Zdelay{duration;code}runs a code block after a delay (e.g. 10s, 2m) in a background task;ZreplyIn{duration;content}replies to the trigger message after a delay. Both are fire-and-forget and cancelled on restart.
Alpha v4
Moderation, message operations, HTTP requests, JSON manipulation, full control flow, error handling, and the component/interaction system.
Core
#type interaction— new command type for component interaction handlers.#type event— new command type for Discord gateway event handlers.onInteraction{id?}trigger — runs when a button, select menu, or modal is submitted. Specific handler (onInteraction{my_button}) takes priority over catch-all (onInteraction).ZcustomID{}— returns the custom_id of the current interaction.ZinputValue{fieldID}— reads a submitted modal text input field.
Alpha v2
Reactions, emojis, text splitting, permissions, threads, and blacklists. Introduced the Zif condition system.
Core
Zif{condition;then;else?}— lazy conditional evaluation with==,!=,>,<,>=,<=,contains,startsWith,endsWith,&&,||operators.ZcheckCondition{}— evaluate a condition string and returntrue/false.
Alpha v1
Initial release. Established the core runtime, parser, and execution model.
Core
- ZBR scripting language runtime built in Rust.
- Line-by-line execution with
Z-prefixed function call syntax. - Argument parsing with
;separator, nested function calls, escape sequences ({, ;, \). #trigger,#name,#type,#description,#scope,#optioncommand header system.- Prefix command support (#type prefix).
- Slash command support (#type slash) with typed options.
- Hot-reload:
commands/folder is watched and reloaded on file change. - SQLite persistence via sqlx for variables and cooldowns.