# DomDimaBot — en # Create commands with an AI assistant Give a browsing AI assistant the official DomDimaBot references, then build a command with the correct syntax, permissions, and test steps. Source: https://docs.domdimabot.com/ai-assistants/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt You can give these docs to any assistant that can open public web pages, including GPT, Grok, Gemini, and Kimi. Start with the [documentation index](https://docs.domdimabot.com/llms.txt). Each page also has a **Read Markdown** link at the bottom for a plain-text version with the same examples and tables. ## A prompt you can use ```text Help me create a custom command for DomDimaBot. Read https://docs.domdimabot.com/llms.txt and follow the relevant links first. I want: [describe the command and an example chat message]. My plan: [Free, Premium, or Pro]. Who can use it: [everyone, subscribers, moderators, or broadcaster]. Create it through: [Twitch chat or the dashboard]. Explain the response body, setup, expected output, and how to test it. Cite the pages you used. Ask about missing requirements, and do not invent functions or use another bot's syntax. If you cannot read a page, tell me. ``` If your assistant cannot browse, open the relevant **Read Markdown** links and paste their content into the conversation. [All English docs](https://docs.domdimabot.com/llms-full.txt) and [all Spanish docs](https://docs.domdimabot.com/es/llms-full.txt) are also available as larger files. Individual pages are usually easier to use for a focused request. ## References to read before writing a command | Question | Reference | | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | How do I create, edit, or restrict a command? | [Commands overview](https://docs.domdimabot.com/commands/overview/index.txt) | | How do arguments, variables, strings, and conditions work? | [AST syntax and data](https://docs.domdimabot.com/commands/advanced/syntax/index.txt) | | Does a function exist, and which arguments does it take? | [AST functions reference](https://docs.domdimabot.com/commands/advanced/functions/index.txt) | | What are the execution rules, errors, and limits? | [AST execution](https://docs.domdimabot.com/commands/advanced/execution/index.txt) | | Is there a documented pattern for this task? | [AST recipes](https://docs.domdimabot.com/commands/advanced/recipes/index.txt) | Read the specific feature guide too when using [TTS](https://docs.domdimabot.com/tts/index.txt), [triggers](https://docs.domdimabot.com/triggers/index.txt), or [rewards](https://docs.domdimabot.com/rewards/index.txt). Do not assume a function accepts the same arguments as a similarly named chat command. ## Give an answer that can be used 1. Confirm the command's purpose, inputs, caller permissions, and streamer plan. For stateful commands, establish whether data belongs to the channel or each viewer and how long it must persist. 2. Choose a plain text response when that is enough. For dynamic behavior, use DomDimaBot's documented AST syntax: `$(...)` calls functions, `%(...)` accesses user-created variables, and `&p1` accesses the first argument. Placeholders such as `{user}` are not equivalent. 3. Provide the **command name**, **response body**, **cooldown**, and **user level** separately. For chat setup, also provide the full `!cc` instruction. The name passed to `!cc` does not include `!`; viewers invoke the saved command with `!`. 4. Check each function's signature, storage lifetime, plan requirement, and execution limits in the linked references. Initialize state before relying on its value. Restrict commands that perform moderation or change channel settings to the intended authorized callers. 5. Explain a normal input and expected output. For arguments or stored state, also describe missing-input and first-run behavior. Label expected results as expected; do not claim that a generated command was executed without actually testing it. ## Worked example: a welcome command Goal: let viewers run `!hello` to receive a welcome message using their own name. | Setting | Value | | ------------- | --------------------------------------- | | Name | `hello` | | Response body | `Hello $(user)! Welcome to the stream.` | | Cooldown | `10` seconds | | User level | `everyone` | As a broadcaster or another authorized command manager, create it in Twitch chat with: ```text !cc -cd=10 -ul=everyone hello Hello $(user)! Welcome to the stream. ``` Or enter the settings above in the dashboard's **Commands** editor. Save only the response body in the response field, not the whole `!cc` instruction. When a viewer named `Alex` sends `!hello`, the expected reply is: ```text Hello Alex! Welcome to the stream. ``` This uses the documented [`$(user)` function](https://docs.domdimabot.com/commands/advanced/functions/index.txt). It needs no arguments or stored variables. Test it in your channel after creation; check that the command is enabled and wait for its cooldown before retrying. To change an existing command, use `!ec` as described in the [overview](https://docs.domdimabot.com/commands/overview/index.txt). ## What these files do The index and plain-text pages are generated from the same documentation source on every site build, in English and Spanish. They include source URLs that an assistant can cite, and links it can follow without running JavaScript or signing in. Publishing readable docs does not guarantee that an AI provider indexes them or that every generated answer is correct. Give the assistant the index URL directly, ask it to cite the references it actually read, and test the resulting command before relying on it. --- # AI Personality Give your bot a unique personality powered by AI. Source: https://docs.domdimabot.com/ai-personality/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt DomDimaBot's AI personality feature gives your bot the ability to engage in natural conversation, respond to context, and develop a unique character. ## Personality Settings Configure your bot's character through these settings: | Setting | Description | | ------------------ | --------------------------------- | | **Name** | What viewers call your bot | | **Personality** | Core traits and behavior patterns | | **Greeting** | How the bot greets new chatters | | **Response Style** | Casual, formal, funny, etc. | ## Known Users You can teach DomDimaBot about specific community members: ```json { "username": "superfan123", "description": "Long-time community member, plays RPGs", "relationship": "friend" } ``` The bot will use this context to personalize interactions. ## Response Behavior > note: > > AI responses are probabilistic. The bot may occasionally say unexpected things. Use content moderation settings to filter inappropriate messages. ### Configuration Options * **Response frequency** — How often the bot talks unprompted * **Max message length** — Limit response size * **Conversation memory** — How many past messages the bot considers * **Ignore list** — Users the bot won't respond to ## Content Safety Enable moderation features to filter: * Spam and excessive caps * Links (configurable per-user) * Custom word filters * Rate limiting --- # Commands Learn how DomDimaBot commands work, from built-in commands to advanced AST command flows. Source: https://docs.domdimabot.com/commands/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt DomDimaBot commands power chat automation — from simple replies to programmable AST flows. Choose your path: [Commands Overview](https://docs.domdimabot.com/commands/overview/index.txt): Built-in commands, permissions, cooldowns, and the default command set. [Advanced Custom Commands (AST)](https://docs.domdimabot.com/commands/advanced/index.txt): Syntax, functions, execution rules, and recipes for complex command logic. --- # Advanced Custom Commands (AST) Friendly starting point for DomDimaBot's AST system, with links to syntax, functions, execution, and recipe guides. Source: https://docs.domdimabot.com/commands/advanced/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt DomDimaBot's **AST parser** is the advanced layer behind custom commands. It lets you build commands that can store values, run logic, call functions, reuse other commands, and react differently based on context. > caution: > > This section is for advanced setups. If you only need simple text commands, start with [Commands Overview](https://docs.domdimabot.com/commands/overview/index.txt). ## What AST is for Use AST when you want your command to do more than send fixed text. * save counters and user progress * build dynamic replies * run conditionals like if / else logic * work with arrays and loops * call Twitch, moderation, TTS, trigger, and EventSub functions * chain commands together ## Important: variables are not built in DomDimaBot does **not** give you default AST variables automatically. * Variables are **user-created** with `%(...)` * If you want to store a value, you create that variable yourself * Context data usually comes from **functions** like `$(user)`, `$(twitch.game)`, or from **arguments** like `&p1` Example: ```bash %(#wins *(%(#wins) + 1)) "$(user) now has %(#wins) wins!" ``` ## Start here This AST section is now split into smaller guides so it is easier to learn. 1. **[AST Syntax & Data](https://docs.domdimabot.com/commands/advanced/syntax/index.txt)** * prefixes * variables and storage * arguments * arrays * conditionals * loops * command references 2. **[AST Functions Reference](https://docs.domdimabot.com/commands/advanced/functions/index.txt)** * user and Twitch functions * moderation and channel actions * counters, clips, followage * EventSub, TTS, triggers, chat send 3. **[AST Execution, Errors & Limits](https://docs.domdimabot.com/commands/advanced/execution/index.txt)** * how the parser runs * common errors * loop and recursion limits * debugging mindset 4. **[AST Recipes & Patterns](https://docs.domdimabot.com/commands/advanced/recipes/index.txt)** * best practices * initialize-or-increment * guard checks * user selectors * full shield systems ## Quick mental model Think of AST commands as small scripts inside a custom command. * `%(...)` = read or write your own variables * `$(...)` = call a function * `*(...)` = compute logic * `^(...)` = check whether something exists * `#(...)` = run another command from this command ## Quick example This command creates a simple win counter: ```bash *( ^(#wins) ? %(#wins *(%(#wins) + 1)) : %(#wins 1) ) "$(user) has %(#wins) wins!" ``` What it does: 1. checks if `#wins` exists 2. if yes, increments it 3. if no, creates it with `1` 4. prints the updated total ## Plan-aware features Some AST features depend on the streamer's plan. | Feature | Free | Premium | Pro | | -------------------------------- | ------- | ------- | ---- | | Memory variables | Yes | Yes | Yes | | Cache variables (`#`, `##`) | Yes | Yes | Yes | | Database variables (`*`, `**`) | No | Yes | Yes | | Deeper loops | Limited | More | Most | | AI voice / cloned voice features | Yes | Yes | Yes | ## Recommended workflow 1. Start with a plain text response 2. Add arguments like `&p1` 3. Add functions like `$(user)` or `$(twitch.game)` 4. Add variables only when you need state 5. Add conditionals and loops last > tip: > > If an AST command can ban users, grant roles, change title/game, start polls, or trigger media, keep it restricted to moderators or the broadcaster. --- # AST Execution, Errors & Limits How the AST parser runs, common errors, and plan-based safety limits. Source: https://docs.domdimabot.com/commands/advanced/execution/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt This page explains what happens when an AST command runs and how to debug it when something goes wrong. ## Execution flow 1. A command or event triggers the template 2. Argument placeholders like `&p1` and `&t` are resolved 3. Execution context is created with user, channel, and event data 4. Input is tokenized 5. Tokens are parsed into an AST 6. The AST is evaluated 7. Variables are written to memory, cache, or database if needed 8. Final output is rendered and sent to chat ## Why this matters Understanding the order helps you debug issues like: * arguments not showing up where you expect * missing variables * branches running unexpectedly * command references returning surprising results * EventSub functions returning blank values in chat ## Common error messages | Error Pattern | Meaning | | ----------------------------------- | ---------------------------------------------- | | `[Unknown function: name]` | The function is not registered | | `[Loop error: invalid loop syntax]` | The loop syntax is malformed | | `[Loop error: missing loop body]` | The loop is missing `{}` | | `[Parse error: expr]` | The parser could not understand the expression | | `Usage: $(func ...)` | The function arguments are missing or invalid | ## Limits and safety rules ### Loop limits by plan | Plan | Max nesting depth | Max iterations | | ------- | ----------------- | -------------- | | Free | 2 | 25 | | Premium | 3 | 50 | | Pro | 4 | 100 | ### Command reference limits * max recursion depth: `5` * cycles are detected and stopped ### Delay limits * `$(delay N)` supports up to `60` seconds ## Debugging checklist ### 1. Start simple Before building the full command, test a minimal version first. ```bash "Hello $(user)!" ``` ### 2. Add one feature at a time Good order: 1. plain text 2. arguments 3. functions 4. variables 5. conditionals 6. loops ### 3. Check initialization If a cache or database value might not exist yet, check it first: ```bash *(^(#wins) ? %(#wins) : "no wins yet") ``` ### 4. Remember assignment is direct This is wrong if you want to increment: ```bash %(#wins 1) ``` This is correct: ```bash %(#wins *(%(#wins) + 1)) ``` ### 5. Remember EventSub context Functions like `$(cheer.amount)` or `$(reward.input)` only work when the command runs from the matching event type. > note: > > If an EventSub function seems empty during chat testing, that usually does not mean the function is broken. It often just means the current execution context does not contain that event payload. ## Common gotchas ### Blank cache value If a `#` or `##` variable expired, it comes back blank. ### `&t` placement `&t` must be last. You cannot define new `&pN` placeholders after it. ### Loop overuse If a loop can be replaced by a direct expression or command reference, prefer the simpler option. ### Powerful actions in public commands Commands using moderation, role, title, game, poll, or trigger actions should not be available to everyone. ## Practical debugging mindset When a command breaks, ask these questions in order: 1. Are my arguments correct? 2. Did I create the variable before reading it? 3. Am I assigning or incrementing? 4. Am I in the right context for this function? 5. Did I accidentally create recursion or loop complexity? ## Safe testing tip Build the output first, then add side effects. For example, test the text and branch logic before you add: * `$(ban ...)` * `$(vip ...)` * `$(set.title ...)` * `$(start.poll ...)` * `$(trigger.send ...)` That makes it much easier to confirm the logic before the command starts changing real channel state. --- # AST Functions Reference User, Twitch, moderation, EventSub, TTS, trigger, counter, clip, and chat functions available in AST commands. Source: https://docs.domdimabot.com/commands/advanced/functions/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Functions are called with `$(...)`. ```bash $(user) $(random 10) $(twitch.game) ``` > note: > > Some functions only read data. Others perform actions like banning, changing title, speaking TTS, or sending chat messages. Restrict action-heavy commands to trusted roles. ## User functions | Function | Description | Usage | | --------------- | -------------------------- | --------------- | | `$(user)` | Current chatter's username | `$(user)` | | `$(touser)` | Target user from context | `$(touser)` | | `$(randomuser)` | Random chatter in channel | `$(randomuser)` | ## Random functions | Function | Description | Usage | | ------------- | -------------------------------------- | -------------- | | `$(random N)` | Random integer from `0` to `N-1` | `$(random 10)` | | `$(random)` | Random integer using the default range | `$(random)` | ## String functions | Function | Description | Usage | | ------------------------------------ | -------------------------------------------------- | -------------------------------------- | | `$(upper text)` | Uppercases the text | `$(upper hello)` → `HELLO` | | `$(lower text)` | Lowercases the text | `$(lower HELLO)` → `hello` | | `$(title text)` | Capitalizes each word | `$(title hello world)` → `Hello World` | | `$(capitalize text)` | Capitalizes only the first letter | `$(capitalize hello)` → `Hello` | | `$(trim text)` | Removes surrounding whitespace | `$(trim " hi ")` → `hi` | | `$(length text)` | Length of the text | `$(length hello)` → `5` | | `$(slice start [end] text)` | Cuts text by position; negatives wrap from the end | `$(slice 0 5 hello world)` → `hello` | | `$(replace search replacement text)` | Replaces every occurrence (literal, no regex) | `$(replace o 0 foo)` → `f00` | For multi-word search or replacement values, use quotes: `$(replace "old text" "new text" the old text here)`. ## Twitch functions | Function | Description | Usage | | ------------------- | ----------------------- | ------------------- | | `$(twitch.subs)` | Subscriber count | `$(twitch.subs)` | | `$(twitch.title)` | Stream title | `$(twitch.title)` | | `$(twitch.game)` | Current category | `$(twitch.game)` | | `$(twitch.viewers)` | Viewer count / chatters | `$(twitch.viewers)` | | `$(twitch.follows)` | Follower count | `$(twitch.follows)` | | `$(twitch.channel)` | Broadcaster name | `$(twitch.channel)` | | `$(twitch.login)` | Broadcaster login | `$(twitch.login)` | ## Moderation functions | Function | Description | Args | Level | | | ------------------------ | -------------------------------------------- | ----------------------------- | ------- | --- | | `$(vip)` or `$(add.vip)` | Add VIP | `username [days]` | Mod | | | `$(unvip)` | Remove VIP | `username` | Mod | | | `$(ban)` | Ban or timeout user | `username [duration_seconds]` | Mod | | | `$(ban.mod)` | Ban and optionally restore mod | \`username seconds true | false\` | Mod | | `$(mod)` or `$(add.mod)` | Add moderator | `username [days]` | Owner | | | `$(unmod)` | Remove moderator | `username` | Owner | | | `$(clear.chat)` | Clear chat | none | Mod | | | `$(emoteonly)` | Toggle emote-only mode | `[duration_seconds]` | Mod | | | `$(bot.mode attack)` | Manually activate Follow Defense Attack Mode | none | Mod | | | `$(bot.mode status)` | Show current Follow Defense mode | none | Mod | | Temporary mod and VIP durations from `1` to `365` days require **Premium or Pro**. > caution: > > `$(bot.mode attack)` can permanently ban tracked followers from an active follow wave. Use it only in moderator-only commands such as `!defmode`. See [Follow Defense](https://docs.domdimabot.com/follow-defense/index.txt) for details. ## Channel functions | Function | Description | Usage | | --------------------------------------------- | ---------------------- | ------------------------------------------ | | `$(raid channel)` | Raid target channel | `$(raid targetchannel)` | | `$(unraid)` | Cancel raid | `$(unraid)` | | `$(set.title new_title)` | Update stream title | `$(set.title Playing Valorant!)` | | `$(set.game game_name)` | Update category | `$(set.game Valorant)` | | `$(start.prediction title;opt1/opt2;seconds)` | Start prediction | `$(start.prediction Who wins?;A/B;120)` | | `$(start.poll title;opt1/opt2;seconds)` | Start poll | `$(start.poll Favorite game?;COD/Halo;60)` | | `$(ad)` | Ad duration in seconds | `$(ad)` | | `$(ad.time)` | Ad duration in seconds | `$(ad.time)` | | `$(ai prompt)` | AI-generated response | `$(ai tell a joke)` | ## Count functions | Function | Description | Usage | | ------------- | ----------------------------------------- | ------------- | | `$(count N)` | Read current count and optionally add `N` | `$(count 5)` | | `$(count 0)` | Read count without changing it | `$(count 0)` | | `$(count -3)` | Subtract from the count | `$(count -3)` | | `$(scount)` | Simple `+1` increment | `$(scount)` | | `$(bits)` | Bits from a cheer event | `$(bits)` | ## Clip functions | Function | Description | Usage | | ---------------- | -------------------------------- | ---------------- | | `$(create.clip)` | Create a clip and return the URL | `$(create.clip)` | ## Followage functions | Function | Description | Usage | | ----------------------- | ----------------------------------- | -------------------- | | `$(followage username)` | Return how long a user has followed | `$(followage ronni)` | ## EventSub functions These only return useful data when the command is triggered by the matching EventSub event. | Function | Event Context | Returns | | ----------------------- | --------------------------- | -------------------------------- | | `$(raid.channel)` | `channel.raid` | Raiding channel display name | | `$(raid.login)` | `channel.raid` | Raiding channel login | | `$(raid.viewers)` | `channel.raid` | Number of raid viewers | | `$(cheer.amount)` | `channel.cheer` | Bits cheered | | `$(cheer.message)` | `channel.cheer` | Cheer message text | | `$(sub.tier)` | `channel.subscribe` | Prime / Tier 1 / Tier 2 / Tier 3 | | `$(sub.months)` | `channel.subscribe` | Cumulative months | | `$(gifted.user)` | `channel.gift` | Gift recipient username | | `$(hypetrain.progress)` | `hypetrain.event` | Progress toward goal | | `$(hypetrain.level)` | `hypetrain.event` | Current level | | `$(hypetrain.end)` | `hypetrain.event` | End timestamp | | `$(shoutout.channel)` | `channel.shoutout` | Channel that was shouted out | | `$(reward.input)` | `channel.points_redemption` | User redemption input | | `$(redemption.input)` | `channel.points_redemption` | User redemption input | | `$(ad)` | `channel.ad_break` | Ad duration | ## TTS functions | Function | Plan | Description | Usage | | --------------------------- | ---- | -------------------- | --------------------------- | | `$(tts message)` | All | Queue default TTS | `$(tts Hello world)` | | `$(tts.speak message)` | All | Same as `$(tts ...)` | `$(tts.speak Hello)` | | `$(tts.ai message)` | All | Same as `$(tts ...)` | `$(tts.ai Hello world)` | | `$(tts.clone name message)` | All | Voice clone TTS | `$(tts.clone voice1 Hello)` | ## Trigger functions | Function | Description | Usage | | --------------------------- | --------------------- | ------------------------------ | | `$(trigger.send name)` | Fire a trigger | `$(trigger.send airhorn)` | | `$(trigger.send name true)` | Fire a queued trigger | `$(trigger.send airhorn true)` | ## Delay, control, and chat functions | Function | Description | Usage | | ---------------------- | ------------------------------- | ------------------------------ | | `$(delay N)` | Pause for `N` seconds, max `60` | `$(delay 5)` | | `$(break)` | Exit a loop early | `$(break)` | | `$(continue)` | Skip the current loop iteration | `$(continue)` | | `$(chat.send message)` | Send a message to chat | `$(chat.send Hello everyone!)` | ## Quick examples | Function | Example Usage | Example Output | | ------------------------------ | ------------------------------------------------ | ----------------------------------- | | `$(user)` | `"Welcome $(user)!"` | `Welcome ronchi!` | | `$(random 20)` | `"You rolled: $(random 20)"` | `You rolled: 7` | | `$(twitch.subs)` | `"We have $(twitch.subs) subscribers!"` | `We have 1542 subscribers!` | | `$(count 1)` | `"Uses: $(count 1)"` | `Uses: 42` | | `$(followage ronchi)` | `"$(user) has followed for $(followage ronchi)"` | `ronchi has followed for 1 year...` | | `$(create.clip)` | `"Clip: $(create.clip)"` | `Clip: https://clips.twitch.tv/...` | | `$(trigger.send airhorn)` | `"$(trigger.send airhorn)"` | Trigger fires | | `$(chat.send Hello everyone!)` | `"$(chat.send Hello everyone!)"` | Message sent | > tip: > > If a function changes channel state or moderates users, pair it with proper command permissions in your dashboard. --- # AST Recipes & Patterns Best practices and advanced AST patterns, including counters, guard checks, user selectors, and shield systems. Source: https://docs.domdimabot.com/commands/advanced/recipes/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt This page shows reusable AST patterns you can adapt into your own commands. ## Best practices ### Increment correctly Wrong: ```bash %(#wins 1) ``` Correct: ```bash %(#wins *(%(#wins) + 1)) ``` ### Initialize before you depend on a value ```bash *(^(#wins) ? %(#wins) : 0) ``` ### Choose the right storage * use `#` or `##` for temporary 24h data * use `*` or `**` for permanent Premium / Pro data ### Keep loops small * respect plan limits * use `$(break)` if you can exit early ### Use real event context for EventSub commands * chat tests do not fully represent redemptions, cheers, raids, or subscriptions ## Pattern summary | Pattern | Syntax idea | Purpose | | ----------------------- | ----------------------------------- | --------------------------------------- | | Initialize-or-increment | `*(^(**x) ? %(**x + 1) : %(**x 1))` | Smart counter | | User selector | `%(**var(%(target)))` | Read or write another user's state | | Guard check | `*(^(**target) ? FAIL : ACT)` | Prevent an action if a condition exists | | Side effect in ternary | `*(cond ? $(action) : "")` | Execute an action in a branch | | Nested comparison | `*(a > b ? A_WIN : B_WIN)` | Multi-branch combat logic | | State arithmetic | `%(winner *(%(winner) - %(loser)))` | Update stored state with math | ## Recipe 1: initialize or increment This is one of the most common AST patterns. ```bash *( ^(**escudos) ? %(**escudos *(%(**escudos) + 1)) : %(**escudos 1) ) $(user) ha comprado un escudo, ahora tiene %(**escudos) escudos ``` What it does: 1. checks whether `**escudos` exists 2. if yes, adds 1 3. if no, creates it with value `1` 4. prints the final total ## Recipe 2: guard check / shield bounce If the target has shields, the attack bounces. If not, the target gets banned and loses shields. ```bash %(target $(reward.input)) *( ^(**escudos(%(target))) ? $(ban.mod $(user) 300 true) "¡%(target) tiene escudos! El ataque rebotó hacia %(user)." : $(ban.mod %(target) 300 true) %(**escudos(%(target)) 0) "¡%(user) atacó y baneó a %(target)! Los escudos de %(target) se han perdido." ) ``` Key ideas used here: * store event input in a local variable * use a user selector to inspect another user's data * perform an action inside a ternary branch * reset state after the action ## Recipe 3: full shield battle Whoever has more shields wins. The loser is banned. The winner loses shields equal to the loser's amount. ```bash %(attacker %(user)) %(defender $(reward.input)) *( ^(**escudos(%(defender))) ? *( ^(**escudos(%(attacker))) ? *( %(**escudos(%(attacker))) > %(**escudos(%(defender))) ? $(ban.mod %(defender) 300 true) %(**escudos(%(defender)) 0) %(**escudos(%(attacker)) *(%(**escudos(%(attacker))) - %(**escudos(%(defender))))) "¡%(attacker) gana! %(defender) baneado. %(attacker) ahora tiene %(**escudos(%(attacker))) escudos." : $(ban.mod %(attacker) 300 true) %(**escudos(%(attacker)) 0) %(**escudos(%(defender)) *(%(**escudos(%(defender))) - %(**escudos(%(attacker))))) "¡%(defender) gana! %(attacker) baneado. %(defender) ahora tiene %(**escudos(%(defender))) escudos." ) : "¡%(defender) tiene escudos pero %(attacker) no tiene ninguno!" : $(ban.mod %(defender) 300 true) "¡%(defender) no tiene escudos y fue baneado por %(user)!" ) ``` What makes this advanced: * nested ternaries * reading two users' stored state * performing multiple writes in a branch * arithmetic updates based on previous state ## Building your own systems When you design an advanced AST command, this order usually works best: 1. define the input 2. decide what state must be stored 3. define guard checks 4. define the success branch 5. define the fail branch 6. only then add side effects like bans, title changes, or triggers ## Good use cases for AST recipes * loyalty systems * economy counters * collectible inventories * viewer battles * redemption-driven mini games * dynamic shoutouts * timed chat workflows > tip: > > If your logic starts becoming hard to read, split the system across more than one command and use `#(...)` command references to keep each piece smaller. --- # AST Syntax & Data Core AST building blocks: prefixes, storage, arguments, arrays, expressions, conditionals, loops, and command references. Source: https://docs.domdimabot.com/commands/advanced/syntax/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt This page covers the core syntax you use to build AST commands. ## Core prefixes The parser understands 5 main prefixes: | Prefix | Syntax | Purpose | Example | | ------ | ---------------------------- | ------------------------ | ------------------------- | | `$( ` | `$(funcName arg1 arg2)` | Call a function | `$(random 10)` | | `%( ` | `%(name)` or `%(name value)` | Read or write a variable | `%(wins)`, `%(wins 5)` | | `*( ` | `*(condition ? yes : no)` | Compute logic or math | `*(5 > 3 ? "yes" : "no")` | | `^( ` | `^(variableName)` | Check existence | `^(#wins)` | | `#( ` | `#(commandName args...)` | Call another command | `#(othercmd arg1)` | ## Variables and storage Variables are created by you. They can be temporary or persistent depending on the prefix you choose. | Prefix | Storage | Persistence | Plan | Example | | ------ | ---------------------- | ---------------------- | ------------- | ------------ | | none | Memory | Current execution only | Free | `%(temp)` | | `#` | Cache | Up to 24 hours | Free | `%(#wins)` | | `##` | Cache + user-scoped | Up to 24 hours | Free | `%(##chips)` | | `*` | Database | Permanent | Premium / Pro | `%(*wins)` | | `**` | Database + user-scoped | Permanent | Premium / Pro | `%(**rank)` | ### Important behavior 1. Cache variables expire after about 24 hours. 2. Expired cache values come back **blank**, not `0`. 3. Assignment overwrites. ```bash %(#wins 1) ``` The example above **sets** the value to `1`. It does not add 1. ### Correct increment pattern ```bash %(#wins *(%(#wins) + 1)) ``` ### User-scoped selectors User-scoped values can target another user: ```bash %(##rank) %(##rank(&p1)) %(**rank) %(**rank(&p1)) ``` ## Argument placeholders When a viewer uses a command, their arguments can be accessed with placeholders. | Placeholder | Meaning | Example | | ---------------------- | --------------------------- | ---------------------- | | `&p1`, `&p2`, `&p3`... | Positional arguments | `&p1` = first argument | | `&t` | All remaining trailing text | `&t` = everything left | ### Rules * `&t` must come last * you cannot create new `&pN` placeholders after `&t` ### Examples ```bash Command: !greet Hello World Message: Hello &p1 and &p2! → Hello Hello and World! ``` ```bash Command: !echo lots of args here Message: &p1 &p2 &t → lots of args here ``` ```bash Message: &t &p1 → Error: cannot create new &pN after &t ``` ## Template strings Use double quotes and `${}` when you want interpolation inside a string. ```bash "Hello ${$(user)}!" "You've won ${%(#wins)} times!" ``` ## Special characters and escaping Parentheses define where an expression starts and ends, so a literal `)` inside one would close it early. You have three tools to include special characters as plain text: 1. **Balanced pairs just work.** Parentheses that open and close inside an expression are kept as text: ```bash $(say score (5-3)) → score ( 5 - 3 ) ``` 2. **Double quotes** protect any text, including unbalanced characters: ```bash $(say "quoted :) here") → quoted :) here ``` 3. **Backslash escapes** protect a single character. Use `\(` `\)` `\[` `\]` `\{` `\}` `\;` `\?` `\:` and `\\`: ```bash $(say hello \:\)) → hello :) %(mood \:\)) %(mood) → :) ``` > tip: > > Emoticons like `:)` or `;)` are the most common case — escape them (`\:\)`, `\)`) or wrap the text in quotes. ## Arrays ### Literal arrays ```bash %[item1, item2, item3] %[1, 2, 3, 4, 5] ``` ### Array accessors | Syntax | Meaning | Example | | ----------------- | ------------------- | ----------------------------- | | `%(arr[0])` | Access by index | `%(items[0])` | | `%(arr[-1])` | Access from the end | `%(items[-1])` = last element | | `%(arr[random])` | Random element | `%(items[random])` | | `%(arr[].length)` | Array length | `%(items[].length)` | | `%(arr[] value)` | Append value | `%(items[] extra)` | | `%(arr[2] value)` | Replace by index | `%(items[2] updated)` | ### Examples ```bash %(items[0]) %(items[random]) %(items[].length) %(items[] extra) %(items[1] replacement) %[1, 2, 3][random] ``` ## Operators and expressions ### Comparison | Operator | Meaning | Example | | ------------ | --------------------- | ------------------------ | | `==` or `=` | Equals | `%(wins) == 5` | | `!=` or `<>` | Not equals | `%(status) != "offline"` | | `>` | Greater than | `%(level) > 3` | | `<` | Less than | `%(age) < 18` | | `>=` | Greater than or equal | `%(wins) >= 10` | | `<=` | Less than or equal | `%(wins) <= 5` | | `~=` | Contains | `%(tags) ~= "gaming"` | ### Arithmetic | Operator | Meaning | Example | | -------- | -------- | ------------------ | | `+` | Add | `*(%(#wins) + 1)` | | `-` | Subtract | `*(%(#wins) - 1)` | | `*` | Multiply | `*(%(x) * 2)` | | `/` | Divide | `*(%(total) / 2)` | | `%` | Modulo | `*(%(count) % 10)` | ### Unary operators | Operator | Meaning | | -------- | ---------- | | `+` | Unary plus | | `-` | Negation | ### Assignment operators These are for **loop variables only**: | Operator | Meaning | | -------- | ------------------- | | `=` | Assign | | `++` | Increment by 1 | | `--` | Decrement by 1 | | `+=` | Add and assign | | `-=` | Subtract and assign | | `*=` | Multiply and assign | | `/=` | Divide and assign | | `%=` | Modulo and assign | ## Conditionals AST uses ternary expressions for branching: ```bash *(condition ? trueValue : falseValue) *(%(#wins) > 10 ? "Champion" : "Keep trying") *(%(islive) == 1 ? "Stream is live!" : "Stream is offline") ``` ## Loops ### Range loop ```bash *(for #i = 0; #i < 3; #i++ { %(out[] #i) }) ``` ### Foreach loop ```bash *(for #item in %(#items[]) { %(result[] %(#item)) }) ``` ### Loop control | Function | Purpose | | ------------- | -------------------------- | | `$(break)` | Exit the loop immediately | | `$(continue)` | Skip the current iteration | ### Plan limits | Plan | Max nesting depth | Max iterations | | ------- | ----------------- | -------------- | | Free | 2 | 25 | | Premium | 3 | 50 | | Pro | 4 | 100 | ### Loop example ```bash *(for #i = 0; #i < %(#count); #i++ { %(output[] #i) }) "Your numbers: ${%(output[])}" ``` ## Command references You can run one command from inside another: ```bash #(othercmd arg1 arg2) ``` ### Rules * max recursion depth: `5` * cycles are detected and blocked * referenced output is parsed and substituted back in ## Exists checks Use `^()` to ask if something exists: ```bash ^(#wins) ^(#items[0]) ^(##balance) ``` This returns `true` or `false`. > tip: > > If you are writing a command that stores state, `^()` is often the cleanest way to decide between “initialize” and “update”. --- # Commands Overview Everything about DomDimaBot's default and custom commands. Source: https://docs.domdimabot.com/commands/overview/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Commands are the foundation of DomDimaBot. They are split into two categories: **Default Commands** (built-in) and **Custom Commands** (created by you). ## Default Commands These commands come pre-installed with DomDimaBot. They are built in, but we do **not** call them “reserved” here because they are gradually becoming normal commands that users can configure and edit. > note: > > This section matches the current built-in command list from the bot config. Many of these commands can be enabled, disabled, and adjusted over time. ### Permission Levels * **Everyone** — any viewer can use it * **Moderator** — moderator-level access required * **Editor** — higher-level management commands ### 🎮 Stream, Chat & Moderation | Command | Permission | Default State | What it does | | ------------- | ---------- | ------------- | ------------------------------------------------------------------------- | | `!anuncio` | Moderator | Enabled | Sends an announcement to the channel; visible on web browsers, not mobile | | `!promo` | Moderator | Enabled | Text-based promo / shoutout intended to be mobile-friendly | | `!so` | Moderator | Enabled | Mentions a user and can send a clip if clip support is active | | `!game` | Moderator | Enabled | Changes the current game / category | | `!title` | Moderator | Enabled | Changes the current stream title | | `!s` | Everyone | Disabled | Makes the bot speak in chat | | `!onlyemotes` | Moderator | Enabled | Toggles emote-only mode, optionally for a number of seconds | | `!vip` | Editor | Enabled | Grants VIP permanently or temporarily | | `!unvip` | Editor | Enabled | Removes VIP from a user | | `!mod` | Editor | Enabled | Grants moderator permanently or temporarily | | `!unmod` | Editor | Enabled | Removes moderator from a user | | `!vanish` | Everyone | Enabled | Makes a user vanish from chat | | `!clearchat` | Moderator | Disabled | Clears chat | ### 🎯 Predictions & Polls | Command | Permission | Default State | What it does | | -------------- | ---------- | ------------- | -------------------------------------------------------- | | `!predi` | Moderator | Enabled | Creates a prediction | | `!lockpredi` | Moderator | Enabled | Locks the current prediction so users can no longer vote | | `!endpredi` | Moderator | Enabled | Ends the current prediction and chooses the winner | | `!cancelpredi` | Moderator | Enabled | Cancels the current prediction | | `!poll` | Moderator | Enabled | Creates a poll | | `!endpoll` | Moderator | Enabled | Ends the current poll | | `!cancelpoll` | Moderator | Enabled | Cancels the current poll | ### 🛠️ Command & Timer Management | Command | Permission | Default State | What it does | | ----------- | ---------- | ------------- | ------------------------------------------------------------- | | `!cc` | Moderator | Enabled | Creates a custom command | | `!ec` | Moderator | Enabled | Edits a custom command | | `!dc` | Moderator | Enabled | Deletes a custom command | | `!enable` | Moderator | Enabled | Enables a command | | `!disable` | Moderator | Enabled | Disables a command | | `!commands` | Everyone | Enabled | Shows the commands available to the user based on permissions | | `!cct` | Moderator | Enabled | Creates a custom timer command | | `!ect` | Moderator | Enabled | Edits an existing timer command | | `!dct` | Moderator | Enabled | Deletes a timer command | ### 🎉 Utility & Fun | Command | Permission | Default State | What it does | | ------------- | ---------- | ------------- | ------------------------------------------------------------- | | `!ruletarusa` | Everyone | Enabled | Russian roulette; can timeout the user for 150 seconds | | `!sumimetro` | Everyone | Enabled | Gives a dominant / submissive reading for you or another user | | `!memide` | Everyone | Enabled | Returns an imaginary measurement | | `!amor` | Everyone | Enabled | Measures love between two users | | `!ponerla` | Everyone | Enabled | Returns a percentage chance | | `!mecabe` | Everyone | Enabled | Returns a measurement-style joke result | | `!followage` | Everyone | Enabled | Shows how long someone has followed the channel | | `!clip` | Everyone | Enabled | Creates a clip with optional duration and title | | `!duel` | Everyone | Enabled | Starts a duel between users | ### Exact Syntax & Limits #### `!anuncio` **Usage:** `!anuncio `\ **Limit:** message cannot be longer than `300` characters\ **Note:** visible on web browsers, not mobile **Example:** ```text !anuncio Hello how are you ``` #### `!predi` **Usage:** `!predi ;<option1>/<option2>;<time in seconds>`\ **Limits:** * title max `30` characters * options max `20` characters each * minimum `2` options, maximum `10` * options must be separated with `/` * time must be between `30` seconds and `5` minutes **Example:** ```text !predi Will the streamer win?;Yes/No;60 ``` #### `!endpredi` **Usage:** `!endpredi <option number>`\ **Note:** the option number must be the winning option number **Example:** ```text !endpredi 1 ``` #### `!cancelpredi` **Usage:** `!cancelpredi`\ **Note:** only works if the prediction is active or blocked #### `!lockpredi` **Usage:** `!lockpredi`\ **Note:** only works if the prediction is active #### `!poll` **Usage:** `!poll <title>;<option1>/<option2>;<time in seconds>`\ **Limits:** * title max `25` characters * options max `25` characters each * minimum `2` options, maximum `5` * options must be separated with `/` * time must be between `30` seconds and `5` minutes **Example:** ```text !poll Will the streamer win?;Yes/No;60 ``` #### `!endpoll` **Usage:** `!endpoll`\ **Note:** only works if the poll is active #### `!cancelpoll` **Usage:** `!cancelpoll`\ **Note:** only works if the poll is active #### `!game` **Usage:** `!game <game name>` **Example:** ```text !game Fortnite ``` #### `!title` **Usage:** `!title <title>` **Example:** ```text !title Hello how are you ``` #### `!s` **Usage:** `!s <message>`\ **Default state:** disabled **Example:** ```text !s Hello how are you ``` #### `!sumimetro` **Usage:** `!sumimetro [username]` **Examples:** ```text !sumimetro !sumimetro username ``` #### `!memide` **Usage:** `!memide` #### `!amor` **Usage:** * `!amor <username>` * `!amor <user1> <user2>` **Notes:** * if you target yourself, the command responds with a negative phrase * if you provide no arguments, it reminds you how to use it and responds with a negative phrase #### `!ponerla` **Usage:** `!ponerla` #### `!mecabe` **Usage:** `!mecabe` #### `!onlyemotes` **Usage:** `!onlyemotes [seconds]` **Examples:** ```text !onlyemotes !onlyemotes 10 ``` #### `!cc` **Usage:** `!cc [options] <command name> <command response>` **Supported options:** * `-cd=<value>` for cooldown * `-ul=<value>` for user level **Limits:** * name cannot contain spaces * name cannot contain special characters * name max `20` characters * response max `450` characters **Examples:** ```text !cc discord Follow me on my Discord Server: discord.cdom201.com !cc -cd=10 -ul=everyone discord Join my discord server at [link] ``` #### `!ec` **Usage:** `!ec [options] <command name> <command response>` **Supported options:** * `-cd=` * `-ul=` **Limits:** * name cannot contain spaces * name cannot contain special characters * name max `20` characters * response max `450` characters **Examples:** ```text !ec discord Follow me on my discord: discord.cdom201.com !ec -cd=10 -ul=mod discord Follow me on my discord: discord.cdom201.com ``` #### `!dc` **Usage:** `!dc <command name>` **Example:** ```text !dc discord ``` #### `!followage` **Usage:** `!followage [username]` #### `!clip` **Usage:** * `!clip` * `!clip 20` * `!clip Epic moment` * `!clip 20 Epic moment` **Behavior:** * if the first argument is a number, it is treated as duration * valid duration range is `5` to `60` seconds * if the first argument is not a number, it is treated as title * out-of-range durations default to `30` seconds #### `!vip` **Usage:** `!vip <username> [days]` **Note:** temporary VIP is available only for **Premium** and **Pro** users, with a maximum of `30` days. #### `!commands` **Usage:** `!commands`\ **Note:** only shows commands available for that user's permission level #### `!clearchat` **Usage:** `!clearchat`\ **Default state:** disabled #### `!enable` **Usage:** `!enable <command name>` #### `!disable` **Usage:** `!disable <command name>` #### `!cct` **Usage:** `!cct <timer name> <frequency> <message>` **Examples:** ```text !cct mytimer 15 Hello world! !cct shoutout 30 Check out the socials! !cct pro-reminder 7m This Pro timer runs every seven minutes. ``` **Notes:** * this is a repeating timer command that runs only while the channel is live; it is separate from one-time countdown timers * a bare number is interpreted as minutes; `15m` and `1h` are also accepted * Free intervals: `15`, `30`, `45`, or `60` minutes * Premium intervals: multiples of `5` minutes from `5` through `180` * Pro intervals: any whole minute from `1` through `180` * existing out-of-tier intervals keep running after plan changes, but editing requires choosing an interval allowed by the current plan * timer messages support the full AST parser, including command references such as `#(command)` #### `!ect` **Usage:** `!ect <timer name> [frequency] [message]` **Note:** the timer must already exist and any edit must satisfy the current plan's interval rules **Example:** ```text !ect mytimer 10m New message here ``` #### `!dct` **Usage:** `!dct <timer name>` **Example:** ```text !dct mytimer ``` #### `!mod` **Usage:** `!mod <username> [days]` **Note:** temporary moderator is available only for **Premium** and **Pro** users, with a maximum of `30` days. #### `!unmod` **Usage:** `!unmod <username>` #### `!unvip` **Usage:** `!unvip <username>` #### `!vanish` **Usage:** `!vanish <username>` #### `!duel` **Usage:** * `!duel <username>` * `!duel accept` * `!duel decline` **Note:** the challenged user must accept or decline the duel > tip: > > If you want advanced dynamic logic, variables, functions, chaining, or stored state, continue to the AST docs in the next section. The goal here is to describe the built-in command set as it currently exists. ## Custom Commands Custom commands are created by you and can send text, use AST functions, store data, trigger media, and call other commands. > tip: > > Check the [Dashboard](https://docs.domdimabot.com/dashboard/index.txt) page for a visual guide to creating and managing custom commands through the web interface. ### How to Create Custom Commands You can create custom commands in two ways: **Via Chat** Use the `!cc` command directly in chat: ``` !cc <command_name> <response> ``` The command name is created **without** the `!`. **Example:** ``` 😎Streamer: !cc discord Check out my Discord! discord.gg/example 🤖 DomDimaBot: Command !discord created! ``` With options: ``` !cc -cd=300 -ul=tier1 discord Sub-only Discord link! discord.gg/subonly 🤖 DomDimaBot: Command !discord created with custom settings! ``` | Option | Description | | ------ | ------------------------------------------------------------------------------------------------------------------------------------- | | `-cd=` | Cooldown in seconds: use an integer greater than `5` when creating with `!cc`. Values of `5` or below become `15`; `!ec` accepts `5`. | | `-ul=` | User level: `everyone`, `tier1`, `tier2`, `tier3`, `vip`, `founder`, `mod`, `editor`, `admin`, `broadcaster` | **Editing:** `!ec <name> <new response>`\ **Deleting:** `!dc <name>` **Via Dashboard** Navigate to the **Commands** section in your dashboard for a visual editor with: * Full command list with enable/disable toggles * Cooldown and permission settings * Response editor for command text / AST templates * Command usage statistics * Timer management ### Basic vs Advanced Custom Commands There are two good ways to think about custom commands: | Type | Best for | Example | | ----------------------- | ------------------------------------------ | ---------------------------------- | | **Basic text commands** | links, rules, simple info | `!discord`, `!rules`, `!schedule` | | **AST commands** | dynamic replies, counters, logic, triggers | `!uptime`, `!hug`, loyalty systems | ### Important AST Note DomDimaBot does **not** use placeholder syntax like `{user}` or `{game}` for advanced command logic. Use: * `$(user)` for the current user * `$(twitch.game)` for the current game * `&p1`, `&p2`, `&t` for arguments * `%(...)` for variables you create yourself ## Examples of Correct Custom Command Patterns **Text Command** Plain text responses for info, links, and announcements. ``` !cc discord Check out my Discord! discord.gg/example ``` **Chat example:** ``` 💬 Viewer: !discord 🤖 DomDimaBot: Check out my Discord! discord.gg/example ``` ``` !cc rules Please be kind and have fun! ``` **Functions** Dynamic replies should use AST functions. **Example:** ``` !cc gameinfo $(twitch.channel) is currently playing $(twitch.game) ``` **Chat example:** ``` 💬 Viewer: !gameinfo 🤖 DomDimaBot: DomDima is currently playing Valorant ``` **Arguments** Use `&p1`, `&p2`, and `&t` when you want input from the user. **Single argument:** ``` !cc hug $(user) sends a warm hug to &p1! 🤗 ``` **Chat example:** ``` 💬 Viewer: !hug @FriendUser 🤖 DomDimaBot: Viewer sends a warm hug to @FriendUser! 🤗 ``` **Trailing text:** ``` !cc say $(user) says: &t ``` **Chat example:** ``` 💬 Viewer: !say this bot is amazing 🤖 DomDimaBot: Viewer says: this bot is amazing ``` **Stored Data** AST variables are created by you. They are not built in by default. ``` !cc wins *(^(#wins) ? %(#wins *(%(#wins) + 1)) : %(#wins 1)) $(user) now has %(#wins) wins! ``` **Chat example:** ``` 💬 Viewer: !wins 🤖 DomDimaBot: Viewer now has 1 wins! ``` On the next use: ```text 💬 Viewer: !wins 🤖 DomDimaBot: Viewer now has 2 wins! ``` **Triggers & Chaining** You can trigger configured media and call other commands from AST. **Trigger example:** ``` !cc airhorn $(trigger.send airhorn) AIRHORN! ``` **Chat example:** ``` 💬 Viewer: !airhorn 🤖 DomDimaBot: AIRHORN! ``` If a trigger named `airhorn` exists, it will fire when the command runs. **Command reference example:** ``` !cc creator Check out my links here: #(discord) ``` This runs the `discord` command inside `creator`. ### Advanced Custom Commands The examples above only cover the safe basics. The full AST system supports: * **Conditions** with `*(...)` * **Variables and storage** with `%(...)` * **Existence checks** with `^(...)` * **Arguments** with `&p1`, `&p2`, and `&t` * **Command references** with `#(...)` * **Loops, arrays, and advanced logic** * **Function calls** for Twitch, moderation, TTS, triggers, EventSub, and more 👉 For the full and correct AST reference, use these pages: * **[Advanced Custom Commands](https://docs.domdimabot.com/commands/advanced/index.txt)** * **[AST Syntax & Data](https://docs.domdimabot.com/commands/advanced/syntax/index.txt)** * **[AST Functions Reference](https://docs.domdimabot.com/commands/advanced/functions/index.txt)** * **[AST Execution, Errors & Limits](https://docs.domdimabot.com/commands/advanced/execution/index.txt)** * **[AST Recipes & Patterns](https://docs.domdimabot.com/commands/advanced/recipes/index.txt)** *** *To create custom commands, use the `!cc` command in chat or visit the Commands section in your dashboard.* --- # Dashboard Navigate and use the DomDimaBot dashboard. Source: https://docs.domdimabot.com/dashboard/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt The DomDimaBot dashboard is your central hub for configuring and monitoring your bot. ## Dashboard Sections ### Overview The main dashboard view shows: * Current stream status * Quick stats (viewers, followers, commands used) * Recent activity feed * Active triggers ### Commands * Create and edit chat commands * Set permissions and cooldowns * Preview command responses * Organize commands with tags ### Rewards * Manage channel point rewards * View redemption history * Set automated vs manual rewards * Configure cooldown periods ### Triggers * Upload media files (sounds, images) * Configure trigger events * Test trigger sequences * Monitor OBS connection status ### Settings * **General** — Channel name, language, timezone * **Permissions** — Who can use what features * **Moderation** — Auto-moderation settings * **Integrations** — Connect external services ## Quick Actions Access common actions from the top navbar: | Action | Description | | ---------------------- | --------------------------------------- | | **Test Command** | Quickly test any command | | **Toggle Stream Mode** | Enable/disable stream-specific features | | **Emergency Stop** | Instantly disable all triggers | | **Dashboard Refresh** | Force sync with Twitch | ## Navigation Use the sidebar to navigate between sections. The sidebar is collapsible on smaller screens. * **Dashboard** — Overview and quick actions * **Commands** — Manage chat commands * **Rewards** — Channel point rewards * **Triggers** — Media and automation * **AI Personality** — Bot character settings * **Analytics** — Stream metrics and insights * **Settings** — Configuration options --- # Follow Defense Protect your channel from follow floods, bot follow attacks, and hate raids. Source: https://docs.domdimabot.com/follow-defense/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Follow Defense helps protect your stream when a bad actor sends a large wave of bot accounts to follow your channel. These attacks can spam chat alerts, trigger overlays repeatedly, and overwhelm your moderation workflow. DomDimaBot watches follow velocity in the background and can move through three protection levels: **Silent Mode**, **Protection Mode**, and **Attack Mode**. > note: > > Follow Defense can be fully disabled. If you already use another protection system, turn DomDimaBot Follow Defense off to avoid interference with your alerts or moderation flow. ## What Follow Defense does When enabled, DomDimaBot can: * Detect unusually fast follow bursts in seconds. * Temporarily silence follow alerts to stop chat and overlay spam. * Track followers in the current wave for review or later action. * Ban new followers during confirmed protection events. * Manually escalate to Attack Mode with a custom command. * Detect raids and track raid follows without automatically treating them as attacks. * Save attack history and possible hate raid sources for future reference. ## Mode overview | Mode | Default trigger | What happens | | ------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | **Normal** | No active burst | Follow alerts work normally. | | **Silent Mode** | 10 follows in 5 seconds | Follow alerts are suppressed and the wave is tracked. No bans happen yet. | | **Protection Mode** | 100 follows in the detection window | DomDimaBot announces protection and bans new follows from the wave, unless an active raid is detected. | | **Attack Mode** | 500 follows or manual activation | DomDimaBot bans all tracked follows from the wave and continues banning new follows until the mode expires or is reset. | All thresholds are configurable per channel. ## How detection works Follow Defense uses a short time window instead of waiting minutes to react. By default: * **Silent threshold:** 10 follows * **Detection window:** 5 seconds * **Tracking duration:** 60 seconds * **Protection threshold:** 100 follows * **Attack threshold:** 500 follows Example: ```txt 10 follows in 5 seconds -> Silent Mode 100 follows in 5 seconds -> Protection Mode 500 follows in 5 seconds -> Attack Mode ``` If a burst only reaches Silent Mode and then stops, DomDimaBot returns to normal after the tracking duration and sends a short summary instead of spamming every follow alert. ## Silent Mode Silent Mode is the first safety layer. When it activates: * DomDimaBot stops sending follow alert messages. * Follow-related triggers should be suppressed while the mode is active. * Followers in the wave are tracked. * No one is banned yet. This is useful for suspicious spikes that might still be legitimate. ## Protection Mode Protection Mode activates when the follow wave grows past the protection threshold. When it activates outside of a raid: * DomDimaBot sends a warning message to chat. * New follows in the wave are banned using Twitch's ban endpoint. * Existing tracked follows remain available for escalation. > caution: > > Protection Mode uses bans, not timeouts, when banning follow attackers. Make sure your thresholds match your channel's normal activity. ## Attack Mode Attack Mode is the strongest response. It can activate automatically when the attack threshold is reached, or manually through an AST command. When it activates: * DomDimaBot bans all tracked followers from the current wave. * DomDimaBot continues banning new follows while the mode is active. * The event is saved in attack history. * If it was activated during a raid, the raider can be recorded as a possible hate raid source. > danger: > > Attack Mode can permanently ban many accounts quickly. Only use it when you are confident the follow wave is hostile. ## Manual command: `!defmode` The backend provides an AST function for manual escalation: ```txt $(bot.mode attack) ``` You can create your own command name for it. A recommended command is: ```txt !defmode -> $(bot.mode attack) ``` You can also check status with: ```txt $(bot.mode status) ``` > tip: > > Restrict your defense command to trusted moderators or the channel owner. It performs moderation actions. ## Raid-aware behavior Not every large follow wave is an attack. A big streamer may raid your channel with thousands of viewers and cause hundreds of legitimate follows. When DomDimaBot receives a Twitch raid event: * It marks the channel as being in a raid window for 5 minutes. * Follows during that window are tracked. * DomDimaBot does not automatically announce Protection Mode or ban raid follows just because the thresholds are reached. * If you manually activate Attack Mode during the raid, DomDimaBot treats the tracked raid wave as hostile and can record the raider as a possible hate raid source. This allows legitimate raids to happen normally while still giving you a fast response if the raid becomes abusive. ## Global disable Use the global **Enable Follow Defense** setting to turn the system on or off. When Follow Defense is disabled: * DomDimaBot does not queue follow defense events. * DomDimaBot does not suppress follow alerts because of defense state. * DomDimaBot does not perform follow-defense bans. * Existing history remains available for review. This is recommended if you already use another bot or moderation service for follow attack protection. ## Settings reference | Setting | Default | Description | | ----------------------------- | ---------- | -------------------------------------------------------------------- | | **Enable Follow Defense** | On | Turns the entire system on or off. | | **Silent Mode enabled** | On | Allows the first protection layer to suppress alerts. | | **Protection Mode enabled** | On | Allows DomDimaBot to ban new follows during a confirmed flood. | | **Attack Mode enabled** | On | Allows automatic or manual full-wave bans. | | **Silent threshold** | 10 | Number of follows needed to enter Silent Mode. | | **Detection window** | 5 seconds | Time window used for burst detection. | | **Protection threshold** | 100 | Number of follows needed to enter Protection Mode. | | **Attack threshold** | 500 | Number of follows needed to enter Attack Mode. | | **Tracking duration** | 60 seconds | How long DomDimaBot tracks the current wave. | | **Expected follows per hour** | Custom | Optional baseline you set for your channel's normal follow activity. | ## Recommended setup 1. **Enable Follow Defense** Turn on the global setting unless you already use another follow protection system. 2. **Set realistic thresholds** Start with the defaults, then adjust based on your channel size and normal follow activity. 3. **Create a manual defense command** Add a moderator-only command such as `!defmode` that runs `$(bot.mode attack)`. 4. **Tell your moderators what it does** Make sure trusted moderators understand that Attack Mode bans all tracked follows in the active wave. 5. **Review history after incidents** Use attack logs and hate raid sources to understand what happened and tune settings later. ## Common scenarios ### A small suspicious spike If 10 follows arrive in 5 seconds and then stop, DomDimaBot enters Silent Mode, suppresses alerts, tracks the wave, then returns to normal with a summary. ### A clear follow flood If the wave reaches the protection threshold outside of a raid, DomDimaBot enters Protection Mode and starts banning new follows from the wave. ### A large hostile attack If the wave reaches the attack threshold, or a moderator uses `!defmode`, DomDimaBot enters Attack Mode and bans all tracked follows in the wave. ### A large legitimate raid If a Twitch raid event is active, DomDimaBot tracks follows silently. It will not automatically ban raid follows unless you manually activate Attack Mode. --- # Getting Started Set up DomDimaBot and start streaming smarter. Source: https://docs.domdimabot.com/getting-started/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Welcome to DomDimaBot! This guide will walk you through getting your bot connected and configured. ## Authentication Levels DomDimaBot has two levels of access: | Feature | Basic Access | Full Access | | --------------------- | ------------ | ----------- | | Custom commands | ✅ | ✅ | | Chat interaction | ✅ | ✅ | | AI personality chat | ❌ | ✅ | | Channel rewards | ❌ | ✅ | | Triggers & media | ❌ | ✅ | | Moderation tools | ❌ | ✅ | | Analytics | ❌ | ✅ | | Streamer integrations | ❌ | ✅ | **Basic Access** is granted automatically when you first log in with Twitch. **Full Access** requires you to authorize the bot to access your Twitch account with all required permissions. ## Setup Process 1. **Visit the dashboard** Go to [domdimabot.com](https://domdimabot.com/) and click **Login with Twitch**. 2. **Authenticate with Twitch** * If this is your first time, a DomDimaBot account will be created automatically * If you've used DomDimaBot before, you'll be logged into your existing account At this point you have **Basic Access** and can use custom commands and basic chat features. 3. **Authorize for Full Access** *(optional but recommended)* Click **Authorize Bot** in the dashboard header. You'll be redirected to Twitch to grant the required permissions. The bot needs access to moderation tools, chat, polls, predictions, subscriptions, and more — everything it needs to run your stream smoothly. > tip: > > You must have 2FA enabled on your Twitch account to grant these permissions. No sensitive data like your stream key is ever requested. When you authorize, DomDimaBot automatically: * Creates default commands for your channel * Sets up default webhooks for live events * Configures your account with sensible defaults If you skip this step, you'll need to set everything up manually. 4. **Configure settings** Set up your preferred language, timezone, and notification preferences from the dashboard. 5. **Test your bot** Type `!ping` in your Twitch chat to verify the bot is responding. ## Next Steps Once you're set up, explore these guides: * **[Commands](https://docs.domdimabot.com/commands/overview/index.txt)** — Create custom chat commands * **[Rewards](https://docs.domdimabot.com/rewards/index.txt)** — Set up channel point redemptions * **[Triggers](https://docs.domdimabot.com/triggers/index.txt)** — Automate sounds and overlays * **[Follow Defense](https://docs.domdimabot.com/follow-defense/index.txt)** — Protect your channel from follow floods and hate raids * **[AI Personality](https://docs.domdimabot.com/ai-personality/index.txt)** — Configure your bot's character --- # DomDimaBot Docs Guides for DomDimaBot — setup, commands, rewards, TTS, triggers, AI, and stream protection. Source: https://docs.domdimabot.com/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Documentation # Docs that keep up with your stream Set up DomDimaBot, automate chat, run rewards and TTS, and protect your channel — organized the same way as the product. [Get started ](https://docs.domdimabot.com/getting-started/index.txt) [Open dashboard ](https://domdimabot.com/) Live chat preview * Viewer !commands * BOT DomDimaBot Active: !ping, !socials, !tts… try !help Premium * VIP\_Streamer !tts Hello chat! * BOT DomDimaBot Playing voice… Pro Start here ## New to DomDimaBot? Connect Twitch, unlock permissions, and learn the dashboard map. [Getting started Connect your account, Basic vs Full access, and go live with the essentials. Read guide → ](https://docs.domdimabot.com/getting-started/index.txt) [Dashboard tour Overview, Commands, Rewards, Triggers — where everything lives day to day. Explore → ](https://docs.domdimabot.com/dashboard/index.txt) Core features ## Build your stream toolkit One card per topic. Jump straight into the guide you need. [Commands Built-in chat commands and advanced AST flows. Open → ](https://docs.domdimabot.com/commands/index.txt) [Text to Speech Providers, voice tags, and AI credit usage. Open → ](https://docs.domdimabot.com/tts/index.txt) [Channel Rewards Points, automated redemptions, reward workflows. Open → ](https://docs.domdimabot.com/rewards/index.txt) [Triggers & Media Sounds, overlays, and event-driven media. Open → ](https://docs.domdimabot.com/triggers/index.txt) Smarter streams ## Personality & protection Keep chat lively and your channel safe when traffic spikes. [AI Personality Voice, known users, and natural chat style for the bot. Open → ](https://docs.domdimabot.com/ai-personality/index.txt) [Follow Defense Detect follow floods, silence spam alerts, escalate modes. Open → ](https://docs.domdimabot.com/follow-defense/index.txt) Ready when you are ## Configure in the dashboard Live settings live on domdimabot.com. Come back here for the full walkthrough. [Go to dashboard ](https://domdimabot.com/) [Setup guide ](https://docs.domdimabot.com/getting-started/index.txt) --- # Channel Rewards Manage and automate your Twitch channel point rewards. Source: https://docs.domdimabot.com/rewards/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Channel point rewards let your viewers spend their accumulated points on special experiences and interactions. ## Setting Up Rewards Navigate to **Rewards** in your dashboard to create and manage channel point rewards. ### Reward Properties | Property | Description | | --------- | ------------------------------------ | | `title` | Display name shown to viewers | | `cost` | Points required to redeem | | `prompt` | Instructions shown when redeeming | | `enabled` | Whether viewers can currently redeem | ## Automated vs Manual Rewards > tip: > > DomDimaBot supports both automated rewards (handled entirely by the bot) and manual rewards (require your approval). ### Automated Rewards These rewards are processed immediately when redeemed: * **Text to Speech** — Read viewer messages aloud * **Sound Effects** — Play audio clips in stream * **Overlay Triggers** — Show animations/graphics on stream * **Bot Commands** — Execute custom command sequences ### Manual Rewards These rewards require your approval before action: * **Shoutouts** — Get a personalized on-stream shoutout * **Queen/King of the Chat** — Special recognition role * **Custom Requests** — Special interactions you approve ## Reward Cooldowns Set global or per-reward cooldowns to prevent spam: ``` Global Cooldown: 30 seconds (applies to all rewards) Sound Effects: 60 second cooldown per viewer ``` --- # Triggers & Media Automate sounds, overlays, and animations during your stream. Source: https://docs.domdimabot.com/triggers/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Triggers are event-based actions that happen automatically during your stream. Connect sounds, overlays, and more to specific moments. ## Trigger Types ### Chat-Based Triggers Activate on specific chat messages or command usage: * Custom command invocations * Keyword detection * Phrase patterns ### Event-Based Triggers React to Twitch events automatically: * New followers * New subscribers * Raids * Bits donations * Channel point redemptions ## Media Types | Type | Description | | ------------ | ------------------------------------------ | | **Sounds** | Audio clips played through stream audio | | **Overlays** | Visual graphics/animations shown on stream | | **TTS** | Text-to-speech messages | | **Combos** | Multiple media types chained together | ## Setting Up Triggers 1. **Navigate to Triggers** Open the Triggers section in your dashboard. 2. **Upload Media** Upload your sound files, overlay images, or configure TTS settings. 3. **Create Trigger** Select your trigger event and link it to the desired media action. 4. **Test** Use the test button to preview how your trigger will behave live. > caution: > > Media triggers require OBS to be connected to DomDimaBot for overlays and some audio features to work properly. ## OBS Connection To use overlay triggers, you'll need the DomDimaBot OBS plugin installed. See the [OBS Setup guide](https://docs.domdimabot.com/triggers/obs-setup/) for instructions. --- # Text to Speech Configure and use text-to-speech voice output for your stream. Source: https://docs.domdimabot.com/tts/ Language: en Documentation index: https://docs.domdimabot.com/llms.txt Text-to-speech (TTS) reads viewer messages aloud during your stream. DomDimaBot supports two TTS providers with different voice qualities, costs, and capabilities. ## Providers ### Piper — Local (All Plans) Piper is a local neural voice engine running on the DomDimaBot server. It is available on all plan tiers and uses AI credits. **AI Credit cost:** 1 credit per 50 characters **Voices available:** * English (US) — `en_US-ryan-medium` * Spanish (Mexico) — `es_MX-ald-medium` **Characteristics:** * Fast synthesis (local, no API calls) * No expressive/emotion tags * No premium AI features * Available to all users regardless of plan tier *** ### Fish Audio — Cloned Voices (All Plans) Fish Audio provides cloned character voices. It is available on all plan tiers and uses AI credits. **Voices available:** * Gojo, Rias Gremory, Carlos Bodoque, Toji Fushiguro **Characteristics:** * Cloned character voices * Available through `$(tts.fish ...)` and `$(tts.clone ...)` * Also usable as the channel default engine *** ## AI Credit Costs Summary | Provider | AI Credits | | ---------- | ------------------- | | Piper | 1 per 50 characters | | Fish Audio | Uses AI credits | ## Monthly AI Credits by Plan | Plan | Monthly Credits | | ------- | --------------- | | Free | 25,000 | | Premium | 125,000 | | Pro | 500,000 | > note: > > AI credits are consumed when a TTS message is queued for synthesis. The credit cost is calculated on the character count of the spoken message. ## Commands ### `!s` — Speak **Permission:** Everyone **Usage:** `!s <message>` Makes DomDimaBot read your message aloud using the channel's default TTS provider and voice settings. **Example:** ``` !s Hello chat, welcome to the stream ``` ### AST Functions In custom commands and the AST system, use these functions for fine-grained control: | Function | Provider | Notes | | ------------------ | ---------------- | --------------------------------- | | `$(tts ...)` | Default provider | Uses channel's default TTS engine | | `$(tts.speak ...)` | Piper only | Forces the local Piper voice | | `$(tts.ai ...)` | Default provider | Same as `$(tts ...)` | | `$(tts.clone ...)` | Fish Audio | Cloned voice TTS | | `$(tts.fish ...)` | Fish Audio | Same as `$(tts.clone ...)` | **Examples:** ``` $(tts.speak Hello from Piper) $(tts.fish gojo Hello from Fish Audio) ``` ## Channel Settings Configure TTS in your dashboard under **Modules → Text to Speech**: * **Enable/disable** channel TTS * **Default provider** selection (Piper or Fish Audio) * **Voice selection** per language or cloned voice * **Message filters** — skip emotes, replace links, normalize whitespace, max length * **Queue settings** — maximum pending TTS items