First of all sorry for my bad english, I am from Germany and currently learning english so please don't be harsh to me.
Now my question is, is there a way to execute a response by a bot on an equation, that turns out correct /equal. So in like an if-else statement
UPDATE - After writing the original answer below, I realized that regular commands would be able to handle many cases if there were a suitable parameter, like
$if('expr', 'true-response', 'false-response'). So I wrote one. You can find it at https://github.com/madelsberger/if_StreamlabsParameterThe parameter is itself implemented in a Python script, so you'd still have to set your bot up to use Python scripts. But then if you install this parameter script, you can use it in regular commands instead of implementing each command with yet more custom scripting.
Note that this script is not approved by the Streamlabs Chatbot support (nor am I familiar with a procedure for submitting it to be approved); and I provide it under the MIT license (i.e. "AS IS"). It should work fine, and you're free to review the code to verify I haven't done anything malicious. I'll try to make a reasonable effort to answer reasonable questions as time permits.
So what you want is for the user to issue a command, and then the bot does a calculation; if a particular equation is satisfied, it sends a particular response, and if the equation is not satisfied it sends a different response (or just doesn't send); is that right?
I don't think basic commands (i.e. the Commands tab) can do this. You can do it with custom scripting. The script you need may not be very complicated, but you would need to install Python 2.7.13 and write a little Python code that satisfies the requirements for a Streamlabs Chatbot script.
As a very basic example, say we want to create a "guess my number" game, and when someone guesses it says "Correct" if the guess is correct.
In your chatbot's
.../Services/Scriptsdirectory you would create a subdirectory for your script (lets call itguess, and in that folder you would createguess_StreamlabsSystem.pyas followsNote that in practice you might want to add cooldown controls, or permission controls. Your code can see an object called
Parentwhich provides methods to handle these things. You also might want things like the trigger command to be configurable; you can set that up using a UI_Config.json file. See the chatbot docs for more details on scripting. https://cdn.streamlabs.com/chatbot/Documentation.pdf