How-to use Nested Commands and Special Variables

There are a couple lesser known but very powerful features within the current version of Ultimate Twitch Bot 3. Nested commands and special variables open up a lot of possibilities where your imagination is very likely the limit. Below I will describe how to use each of these and provide a couple of examples.

Nested Commands

Beginning with version 3.8.15 you can now place any commands inside of a custom command to be executed within the custom command without requiring permissions.

Requirements for using a nested command:

  • Must be in a custom command response.
  • Nested commands are identified by placing their name(case sensitive) or keyword in brackets.
    • Example: [SelfBalanceCheck] or [!bal]
  • Nested commands can use arguments, targets, and variables.
    • Example: [OtherBalanceCheck SeeingBlue], [!check seeingblue], [!giveall 5], or [!check [name]] to target the command user.

Note: Nested commands do not require permission to execute.


Special Variables

TXT Variable

  • This variable looks for text files where ever you tell it to.
  • It accepts full paths and partial paths.
    • Example: [txt=file.txt] – This will look for file.txt in your install folder.
    • Example: [txt=c:\file.txt] – This will look for file.txt in the C:\ directory.
  • The [txt=] variable will be replaced with the first line of the text file.
  • [txt=] variable will be replaced with a random line when the file contains multiple lines.

Note: File paths must not contain spaces.

URL Variable

  • Just like the TXT variable this one will load a document from a given URL.
    • Example: [url = http://seeingblue.us/utb3.txt](No Spaces)
  • The [url = http://seeingblue.us/utb3.txt] variable will be replaced with the first line of the document loaded.

EXE Variable WARNING – DO NOT ALLOW THIS TO ANYONE YOU DO NOT COMPLETELY TRUST!!

  • The EXE variable will execute any file on your computer.
    • Example: [exe=c:\windows\system32\notepad.exe]
    • Example: [exe=run.bat]

Note: File paths must not contain spaces.

 

Using the two features above some creative minds have developed some pretty elaborate games for their channels. Hope this helps and hope you enjoy it. If you have any questions feel free to ask in Discord in our #utb_chat channel.

Thank you,
SeeingBlue

Leave a Reply

Your email address will not be published. Required fields are marked *