Changelog
All notable changes to the ZBR project are documented here.
v1.8.2 - AI Integration Functions
This release adds 9 new AI-powered functions using the Gemini API for text generation, classification, extraction, and image analysis.
New Functions
Zai{apiKey;prompt;model?;maxTokens?;temperature?}: Sends a prompt to the AI and returns the response text. Supports Gemini API keys (AIza… or AQ…).ZaiCtx{apiKey;prompt;model?;maxTokens?;temperature?}: Same asZaibut automatically injects Discord context (author, server, channel, message) as a system message.ZaiDecide{apiKey;content;question;model?}: Asks the AI a yes/no question about the provided content. Returns strictlytrueorfalse.ZaiDecideCtx{apiKey;question;model?}: Same asZaiDecidebut uses the current Discord context instead of provided content.ZaiExtract{apiKey;content;instruction;model?}: Extracts specific information from text based on the instruction (e.g., emails, phone numbers, usernames). ReturnsN/Aif not found.ZaiExtractCtx{apiKey;instruction;model?}: Same asZaiExtractbut extracts from the current Discord context.ZaiClassify{apiKey;content;categories;model?}: Classifies content into one category from a comma-separated list. Returns the best matching category.ZaiClassifyCtx{apiKey;categories;model?}: Same asZaiClassifybut classifies the current Discord context.ZimageAnalyze{apiKey;imageUrl;prompt;model?}: Analyzes an image from a URL using AI vision and returns a text description based on the prompt.
AI Features
- Default model:
gemini-2.5-flash-lite(free tier compatible) - Supports both
AIza...andAQ...API key formats - Uses
v1betaAPI endpoint for maximum model compatibility - Temperature and token limits configurable per function
- Validated outputs for decision and classification functions
v1.8.1 - Advanced Moderation Functions
This release adds 8 new moderation detection functions. All use pure logic, math, or regex, no external APIs required.
New Functions
ZspamDetect{userID;threshold?;windowSeconds?}: Tracks message velocity for a user and returnstrueif they’ve exceeded the threshold within the time window. Defaults: 10 messages / 60 seconds.ZraidDetect{joinCount;windowSeconds?}: Tracks member joins and returnstrueif the guild has exceeded the join threshold within the time window. Defaults: 60 seconds.ZduplicateDetect{similarityThreshold?}: Compares the current message against the last 50 messages in the channel using Levenshtein distance. Returnstrueif a similar message is found. Default threshold: 0.85 (85%).ZmentionSpamDetect{threshold?}: Counts@user,@role,@everyone, and@herementions in the current message. Returnstrueif the count meets or exceeds the threshold. Default: 5.ZlinkSpamDetect{userID;maxLinks?;windowSeconds?}: Tracks messages containing URLs for a user and returnstrueif they’ve exceeded the limit within the time window. Defaults: 3 links / 60 seconds.ZcapsDetect{message?;threshold?}: Calculates the ratio of uppercase letters to total letters. Returnstrueif the ratio meets or exceeds the threshold. Default: 0.7 (70%).ZemojiSpamDetect{message?;threshold?}: Counts Unicode and custom Discord emojis in a message. Returnstrueif the count meets or exceeds the threshold. Default: 10.ZnewAccountDetect{userID;minAgeDays?}: Extracts the account creation date from the Discord snowflake ID and returnstrueif the account is younger than the minimum age. Default: 7 days.
Database
- Added
spam_trackertable, used byZspamDetectandZlinkSpamDetect. - Added
raid_trackertable, used byZraidDetect.
v1.8.0 - Stability, Performance, and API Expansion
This release delivers 11 bug fixes, 3 performance improvements, and 6 new ZBR functions for embeds, JSON, HTTP, and server metadata.
New Functions
- Embeds:
ZeditEmbed{channelID?;messageID;index?}to edit an existing message’s embed by channel and message ID, with optional embed index. - JSON:
ZjsonMerge{target;sourceJson}for deep-merging a JSON string into the working object at a key path (objects merge recursively; scalars and arrays overwrite). - HTTP:
ZhttpHead{url}andZhttpOptions{url}for HEAD and OPTIONS request methods. - Servers:
ZserverSplash{guildID?}andZserverDiscoverySplash{guildID?}returning guild splash and discovery splash CDN URLs.
Bug Fixes
- Fixed missing
\;and\Zescape sequences in loader brace depth tracking. - Fixed duplicate reaction function registrations overwriting
max_args. - Fixed bitwise operation reading from arg 1 before checking arg 2 requirement.
- Fixed empty
Zdivargs causing a panic. - Fixed HTTP response body read failure silently returning an empty string instead of an error.
- Fixed unnecessary
block_in_placewrappingblock_ononJoinHandle. - Fixed
total_shardscomputed fromShardManagerrunners instead of duplicating shard index. - Fixed SQL errors not logged to stderr in var getter and reset functions before returning defaults.
- Fixed cooldown race condition by wrapping read-then-set in a SQLite transaction.
- Fixed
file:linesuffix from runtime error propagation. - Fixed missing graceful shutdown handler for SIGTERM/SIGINT.
Performance
- Batched
block_in_placecalls inbuild_responseto reduce thread pool contention. - Made
Runtime::runfully async, eliminating 12block_in_placewrappers. - Made
execute_codeandbuild_responseasync for improved concurrency.
Chore
- Cleaned up import order and formatting in
bot.rs. - Replaced
starts_withURL validation with proper parsing via theurlcrate.
v1.7.0 - Massive Expansion of Math, String, and Utility APIs
This release introduces over 50 new functions to the ZBR engine, drastically expanding the capabilities for string manipulation, advanced math, randomization, and data validation without requiring external APIs.
Discord API Extensions
- ZfetchInvite: Fetch detailed invite metadata.
- ZuserLocale: Retrieve user locale/language settings.
- ZmessageLink: Generate Discord message jump-links.
Math & Number Utilities
- Zabbreviate, ZbaseConvert, ZbitWise, Zclamp, ZdecimalToHex, Zdice, Zfactorial, Zfinancial, Zgcd, ZhexToDecimal, Zhypot, ZisEven, ZisOdd, Zlcm, Zlerp, ZlistMath, Zpercent, Zroot, Ztruncate
String & List Manipulation
- ZcamelCase, Zcensor, Zclean, Zextract, ZfuzzyMatch, ZkebabCase, ZlistReverse, ZlistShuffle, ZpascalCase, ZrandomCase, ZrepeatText, ZreverseText, ZsnakeCase, ZwordCount
Visual & Color Utilities
- ZcolorInvert, ZcolorRandom, ZhexToHsl, ZhexToRgb, ZhslToHex, ZrgbToHex
Technical & Utility
- ZcharCode, Zentropy, ZformatBytes, ZfromCharCode, Zpad, ZrelativeTime, Zroman, ZtimeDiff, ZtimeFormat, Ztype, Zuuid, Zvalidate
v1.6.0 - System Improvements and Validation
Core
- Hot Reload Debouncing: Added hot reload debouncing (300ms) to prevent multiple reloads on rapid file saves.
- Recursion Limits: Added recursion depth limit (max 100) to prevent stack overflows from circular function calls.
- Debugging: Added file and line number info to error messages for easier debugging.
- CLI: Added
zbr validatecommand to check for syntax errors and missing env vars without starting the bot.
v1.5.6 - Android OS Metadata Support
Core
- OS Metadata: Updated
packages/zbr-linux-arm64/package.jsonto explicitly includeandroidin theosfield, ensuring better compatibility and installation support for Android devices via Termux.
v1.5.5 - Binary Permissions Fix
Core
- Binary Permissions: Fixed an issue in
bin/cli.jswhere the resolved runtime binary lacked executable permissions on Unix-based platforms, causingzbr versionand other commands to fail.
v1.5.4 - Platform-Specific Package Migration
This release migrates the installation process from a postinstall script to platform-specific optional npm packages, improving reliability and compatibility across different operating systems and CPU architectures.
Core
- Optional Dependencies: Replaced
postinstall.jswith 6 platform-specific optional packages (@zbrlang/zbr-linux-x64,@zbrlang/zbr-linux-arm64,@zbrlang/zbr-darwin-x64,@zbrlang/zbr-darwin-arm64,@zbrlang/zbr-windows-x64,@zbrlang/zbr-windows-arm64). - Binary Resolution: Updated
bin/cli.jsto dynamically resolve the binary path from the installed optional package. - Android Support: Added
androidplatform normalization tolinuxinbin/cli.js.
CLI
zbr update: Reworked to runnpm i -g @zbrlang/zbr@latestinstead of manual binary downloads.
CI/CD
- Release Workflow: Updated
.github/workflows/release.ymlto automatically download, version, and publish the platform-specific packages to npm.
v1.5.3 - Fixes and Build Target Optimization
This release fixes critical installation issues for Android/Termux and corrects binary path configurations.
Fixes
- Fixed duplicate key variable in
postinstall.jscausing Android Termux install to fail - Fixed
cli.jsbinary paths pointing to wrong directory and old binary names - Removed iOS binary build target
v1.5.2 - Expansion of Function API and Category Reorganization
This release introduces over 30 new functions, organizes webhook and template functionality into dedicated categories, and adds shard-aware utility functions for advanced bot monitoring.
Core
- Shard-Awareness: Added
shard_idandtotal_shardstoDiscordContext, allowing bots to query their sharding status. - Webhook Consolidation: Moved all webhook-related functions (
sendWebhook,webhookCreate,webhookDelete) into a new, dedicatedwebhookscategory.
New Functions
- Bot:
ZcurrentShard,ZtotalShards - Member Management:
ZmemberPending,ZmemberSearch,ZmemberFlags - Invites:
ZcreateInviteWithRoles - Templates:
ZserverTemplates,ZcreateServerTemplate,ZsyncServerTemplate,ZdeleteServerTemplate,ZtemplateName - Onboarding:
ZonboardingEnabled,ZonboardingMode,ZonboardingDefaultChannels,ZonboardingPrompts - Message:
ZmessageFlags,ZforwardMessage,ZmessageSnapshot,ZsuppressEmbeds - Permissions:
ZeffectivePerms,ZhasPerm,ZpermNames,ZchannelOverwrites - Voice & Stage:
ZvoiceRegion,ZvoiceQuality,ZstageSpeakers,ZstageAudience - Webhooks:
ZeditWebhookMessage,ZdeleteWebhookMessage,ZgetWebhookMessage - Utility:
ZsnowflakeTimestamp,ZsnowflakeAge,ZbulkBan
Modifications
ZisTimedOut: Now supports an optionalreturnTimestampargument.ZinviteInfo: Now fetches real data foruses,isTemporary, andmaxAge.
CI/CD
- Multi-Platform Binary Support: Updated
.github/workflows/release.ymlandpostinstall.jsto build, name, and correctly download platform-specific binaries (Linux x64/arm64, macOS x64/arm64, Windows x64/arm64). - HuggingFace Rebuild Fix: Updated
release.ymlto force a Dockerfile cache bust usingdate +%sduring the HF Space rebuild process, ensuring the latest version is always deployed.
v1.5.1 - Loader Improvements and Escape Fixes
This release improves the command loader’s ability to process complex ZBR scripts and adds new escape sequences.
Core
- Multi-line Function Support: Added brace-depth tracking to the command loader, allowing function calls (e.g.,
Zdescription{...}) to span multiple lines. - Newline Preservation: Fixed an issue where consecutive plain-text lines were incorrectly concatenated without newlines.
\Zand\}Escape Support: Added\Zescape sequence to output literal Z-prefixed text and\}to escape curly brackets, correctly handling nested braces in multi-line commands.- Brace-Aware Commenting: Updated brace counting logic so that
//is only treated as a comment marker when at brace depth 0, preventing URL protocol slashes from breaking multi-line command parsing. - Registry Injection: Updated
loader.rsto correctly pass the function registry during file loading, enabling bracketless function calls in.zbrfiles.
v1.5.0 - Parser Flexibility and Alias Robustness
This release introduces major improvements to the parser’s flexibility, simplifies function invocation, and resolves critical bugs in the alias system and positional argument handling.
Core
- Optional Brackets: Zero-argument function calls no longer require curly brackets (e.g.,
Zusernameworks the same asZusername{}). - Literal Text Handling: Unknown Z-prefixed identifiers (e.g.,
ZUnknown) without brackets are now treated as literal text instead of causing runtime errors. - Nested Bracketless Calls: Bracketless function calls are now correctly recognized and evaluated even when nested within the arguments of other function calls (e.g.,
ZsendMessage{ZchannelID;hello}). - Alias Fixes: Resolved argument merging issues where aliased function calls were losing arguments, and added validation to ensure the aliased function is a valid ZBR function.
Argument Parsing
- Empty Argument Preservation:
split_argsnow correctly preserves empty arguments between semicolons (e.g.,Zfunc{;arg2}correctly mapsarg2to index 1). - Positional Argument Robustness: Refactored 161 functions across the codebase to explicitly handle empty string arguments as “use default” values, preventing positional misalignment bugs.
v1.4.4 - Runtime Aliases and Reply Fix
This release introduces the Zalias system for improved code reusability and fixes a bug in message evaluation.
Core
- Runtime Aliases: Added
Zalias{<expression>;<alias_name>}which allows users to create runtime aliases for any ZBR expression. Aliases are local to the command execution, support chaining, and include a recursion depth guard to prevent infinite loops. - Fixed
ZreplyEvaluation: Resolved a bug whereZreply{}inside a concatenated string (e.g.Hello Zreply{} World) would short-circuit evaluation, causing subsequent content to be ignored. - Ping Precision: Updated
Zping{}to return the actual bot gateway latency with 5 decimal places (in milliseconds) for high-precision monitoring. - Execution Time Precision: Updated
ZexecutionTime{}to return command execution time in milliseconds with 5 decimal places.
v1.4.3 - Performance and Error Handling Improvements
This release focuses on improving bot performance and robustness by caching execution data and surfacing critical database errors.
Core
- AST Caching: Pre-parses ZBR scripts into an AST on load, eliminating redundant parsing on every execution.
- Variable Caching: Implemented a per-execution variable cache in
DiscordContextto eliminate redundant database reads for the same variable within a single command execution. - Regex Optimization: Moved trigger regex compilation to a
staticinitializer, eliminating repeated compilation on every incoming message.
Error Handling
- Structured Error Reporting: Refactored command loading to produce detailed, context-aware error messages (file, line number) when command files fail to parse.
- Database Error Propagation: Database write failures are no longer silently ignored and now surface as error messages in Discord.
- Standardized Error Messages: Aligned database failure messages with the centralized
error_messages.rsformatting system (action_failed_reason).
v1.4.2 - Mobile support and version fix
Distribution
- Android support: Added
aarch64-linux-androidbinary target; ZBR now runs on Android via Termux. - iOS support: Added
aarch64-apple-iosbinary target; ZBR now runs on iOS via iSH.
CLI
- Fixed
zbr version: Now reports the actual binary version instead of the stale npm package version. - Fixed
zbr update: Version is now always accurate after updating.
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.
Features
- Includes all features and functions from Alpha v5 and earlier. Scroll down to see the full history from Alpha v1 to v5.
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
Functions added
Moderation functions
Zmute, Zunmute, Zdeafen, Zundeafen
Voice functions
ZisInVoice, ZuserVoiceChannel, ZuserStreaming, ZuserSelfDeafened, ZuserSelfMuted, ZuserServerDeafened, ZuserServerMuted, ZvoiceKick, ZvoiceMove, ZvoiceMembers, ZvoiceMemberCount, ZvoiceBitrate
Math functions
Zabs, Zpow, Zround
String functions
ZstartsWith, ZendsWith, ZindexOf, Zsubstring, ZpadLeft, ZpadRight, ZregexMatch, ZregexReplace
Time functions
ZfromTimestamp, ZtimeDiff
Channel functions
ZchannelCreated, ZchannelWebhooks, ZchannelInvites
Invite functions
ZcreateInvite, ZdeleteInvite
Role functions
ZroleMemberCount, ZroleMembers
User functions
ZisModerator
Message functions
ZmessageLink
HTTP functions
ZhttpGetHeader, ZhttpRemoveHeader
Stage functions
ZstageCreate, ZstageEdit, ZstageDelete, ZstageTopic
Sticker functions
ZserverStickers, ZstickerCount, ZstickerName, ZstickerID, ZstickerExists, ZstickerDescription, ZstickerEmoji, ZdeleteSticker
Event functions
ZserverEvents, ZeventCount, ZcreateEvent, ZeditEvent, ZdeleteEvent, ZeventName, ZeventDescription, ZeventStart, ZeventEnd, ZeventStatus, ZeventChannel, ZeventSubscribers
Forum functions
ZforumTags, ZforumTagID, ZforumTagEmoji, ZforumTagModerated, ZcreateForumTag, ZeditForumTag, ZdeleteForumTag, ZforumPosts, ZforumPostCount, ZcreatePost, ZpostTags, ZsetPostTags
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 handlersonInteraction{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 interactionZinputValue{fieldID}: reads a submitted modal text input fieldZdefer{}: defers an interaction responseZsuppressErrors{text?;embedIndex?}: suppress errors and show a custom message or embed insteadZtryRun{code;fallback?}: lazy try/catchZstop{}: halt execution silentlyZerror{message}: halt with a custom error messageZonlyIf{condition;error}: guard functionZargsCheck{min;max?;error}: validate argument countZnot{value}: flip a booleanZisBoolean,ZisInteger,ZisNumber,ZisSlash,ZisValidHex: type check functionsZhttpAddHeader{}: add headers for subsequent HTTP requestsZhttpStatus{},ZhttpResult{key;...}: read HTTP response status and JSON body- Full JSON object system with mutable state per execution
Zurl{mode;text}: URL encode/decodeZbyteCount,ZargCount,ZcheckContains,ZremoveLinks: new string utilitiesZgetTimestamp{unit?}: Unix timestampZuserJoined{userID?;format?}: guild join dateZvarExistError{name;error}: halt if global variable doesn’t existZonlyIfMessageContains{message;word;...;error}: guard by message content
Functions added
Moderation functions
Zban, Zkick, Zunban, Ztimeout, ZuntimeOut, Zclear, ZgetBanReason, ZisBanned, ZisTimedOut
Message functions
Zdm, ZdeleteMessage, ZeditMessage, Zephemeral, ZisMentioned, Zmentioned, ZmessageID, ZrepliedMessageID, ZpinMessage, ZunpinMessage, ZpublishMessage, ZgetAttachments, ZgetMessage, ZgetEmbedData, ZisMessageEdited, ZuseChannel
HTTP functions
ZhttpGet, ZhttpPost, ZhttpPut, ZhttpDelete, ZhttpPatch, ZhttpAddHeader, ZhttpStatus, ZhttpResult
JSON functions
ZjsonParse, ZjsonGet, ZjsonSet, ZjsonUnset, ZjsonExists, ZjsonClear, ZjsonStringify, ZjsonPretty, ZjsonArray, ZjsonArrayAppend, ZjsonArrayUnshift, ZjsonArrayPop, ZjsonArrayShift, ZjsonArrayReverse, ZjsonArraySort, ZjsonArrayCount, ZjsonArrayIndex, ZjsonJoinArray
Control functions
Zif, Znot, ZcheckCondition, ZonlyIf, ZargsCheck, ZisBoolean, ZisInteger, ZisNumber, ZisSlash, ZisValidHex
Error functions
Zstop, Zerror, ZsuppressErrors, ZtryRun
Component functions
ZaddButton, ZnewSelectMenu, ZaddSelectMenuOption, ZaddUserSelect, ZaddRoleSelect, ZaddMentionableSelect, ZnewModal, ZaddTextInput, ZeditButton, ZeditSelectMenu, ZeditSelectMenuOption, ZremoveAllComponents, ZremoveButtons, ZremoveComponent, Zdefer, ZinputValue, ZcustomID, ZgetUserSelectUserID, ZgetUserSelectUserIDs, ZgetUserSelectUserCount, ZgetRoleSelectRoleID, ZgetRoleSelectRoleIDs, ZgetRoleSelectRoleCount, ZgetMentionableSelectUserID, ZgetMentionableSelectUserIDs, ZgetMentionableSelectUserCount
Alpha v3
User, role, channel, server, and bot functions. Full Discord entity coverage.
Core
- Context functions:
Zmessage,Zoption,ZuserID,ZchannelID,ZguildID,ZroleID,Zusername Zenabled{}: enable/disable a command at runtimeZallowUserMentions{},ZallowRoleMentions{}: control which mentions the bot pingsZephemeral{}: make slash command responses ephemeralZuseChannel{}: redirect bot output to a different channel
Functions added
User functions
ZuserAvatar, ZuserServerAvatar, ZuserBadge, ZuserBanner, ZuserBannerColor, ZuserExists, ZuserPerms, ZchangeNickname, ZdisplayName, ZuserStatus, ZisAdmin, ZisBooster, ZisBot, ZisUserDMEnabled, ZuserJoined, ZcreationDate
Role functions
ZroleColor, ZroleCount, ZroleExists, ZroleGrant, ZroleID, ZroleName, ZroleNames, ZrolePerms, ZrolePosition, ZhasRole, ZhighestRole, ZlowestRole, ZhighestRoleWithPerms, ZlowestRoleWithPerms, ZuserRoles, ZcreateRole, ZdeleteRole, ZmodifyRole, ZmodifyRolePerms, ZcolorRole, ZsetUserRoles, ZisHoisted, ZisMentionable
Channel functions
ZchannelCount, ZchannelExists, ZchannelName, ZchannelNames, ZchannelPosition, ZchannelTopic, ZchannelType, ZcategoryChannels, ZcategoryCount, ZcategoryID, ZafkChannelID, ZrulesChannelID, ZsystemChannelID, ZdmChannelID, ZparentID, ZisNSFW, ZlastMessageID, ZlastPinTimestamp, ZgetSlowmode, ZslowMode, ZvoiceUserLimit, ZcreateChannel, ZdeleteChannels, ZdeleteChannelsByName, ZmodifyChannel, ZeditChannelPerms
Server functions
ZserverName, ZserverOwner, ZserverIcon, ZguildBanner, ZserverDescription, ZserverVerificationLevel, ZmembersCount, ZboostCount, ZboostLevel, ZafkTimeout, ZguildExists, ZserverEmojis, ZserverInvite, ZinviteInfo
Bot functions
ZbotID, ZbotOwnerID, ZbotTyping, Zping, Zuptime, ZexecutionTime, ZserverCount, ZallMembersCount, ZserverNames, ZcommandName, ZcommandTrigger, ZcommandsCount, ZbotCommands, ZslashCommandsCount, ZslashID, Zenabled
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,&&,||operatorsZcheckCondition{}: evaluate a condition string and returntrue/false
Functions added
Reaction functions
ZaddReactions, ZaddCmdReactions, ZaddMessageReactions, ZgetReactions, ZclearReactions, ZuserReacted
Emoji functions
ZaddEmoji, ZcustomEmoji, ZemojiExists, ZemojiName, ZemoteCount, ZisEmojiAnimated, ZremoveEmoji
Text split functions
ZtextSplit, ZsplitText, ZgetTextSplitIndex, ZgetTextSplitLength, ZjoinSplitText, ZremoveSplitTextElement, ZeditSplitText
Permission functions
ZcheckUserPerms, ZignoreChannels, ZonlyAdmin, ZonlyBotChannelPerms, ZonlyBotPerms, ZonlyForCategories, ZonlyForChannels, ZonlyForIDs, ZonlyForRoles, ZonlyForRoleIDs, ZonlyForServers, ZonlyForUsers, ZonlyNSFW, ZonlyPerms
Thread functions
ZstartThread, ZeditThread, ZthreadAddMember, ZthreadRemoveMember, ZthreadMessageCount, ZthreadUserCount
Blacklist functions
ZblackListIDs, ZblackListUsers, ZblackListRoles, ZblackListRolesIDs, ZblackListServers
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 - HTTP runtime server (Axum): bot sends context, runtime evaluates and returns response
- SQLite persistence via sqlx for variables and cooldowns
Zeval{}: evaluates ZBR code dynamically at runtimeZreply{}: makes the bot reply to the triggering message
Functions added
Embed functions
Ztitle, ZtitleURL, Zdescription, Zcolor, Zauthor, ZauthorIcon, ZauthorURL, Zfooter, ZfooterIcon, Zthumbnail, Zimage, Ztimestamp, ZaddField, ZsendEmbed, ZsendMessage, ZwebhookCreate, ZwebhookDelete, ZsendWebhook
Math functions
Zsum, Zsub, Zdiv, Zmulti, Zcalculate, Zceil, Zfloor, Zmax, Zmin, Zmodulo, Zsqrt, Zsort, Zrandom
Time functions
Ztime, Zdate, Zday, Zmonth, Zyear, Zhour, Zminute, Zsecond
Variable functions
ZgetUserVar, ZsetUserVar, ZresetUserVar, ZgetServerVar, ZsetServerVar, ZresetServerVar, ZgetChannelVar, ZsetChannelVar, ZresetChannelVar, ZgetVar, ZsetVar, Zvar, ZlistVar, ZvarExists
String functions
Zlowercase, Zuppercase, ZcharCount, ZlinesCount, ZnumberSeparator, ZcropText, ZreplaceText, Ztitlecase, ZtrimContent, ZtrimSpace
Random functions
ZrandomCategoryID, ZrandomChannelID, ZrandomGuildID, ZrandomMention, ZrandomRoleID, ZrandomString, ZrandomText, ZrandomUser, ZrandomUserID
Cooldown functions
Zcooldown, ZserverCooldown, ZglobalCooldown, ZgetCooldown, ZchangeCooldownTime