Deep Bot - Twitch Streamer Assistant
Deep Bot => Help/Support => Topic started by: Nazo on December 11, 2015, 04:41:07 AM
-
So, basically, what the title says. I am not entirely sure on how to use @if@ when making a command. Can someone give me a more detailed explanation on how @if@ works? (The Deepbot wiki does not do a very good job at explaining this.)
This is kinda sad 'cause I've been modding for multiple streamers and I still don't know how to use @if@. :-[
-
Hello, may I ask how you have access to DeepBot?
-
I don't have access to the program itself, but I have access to it in chat channels (where I'm a mod). I just make commands for streamers that use Deepbot. (I'm sorta like a Bot wiz, but not really LOL)
-
This is from another user from another post, which can be found here: http://deepbot.deep.sg/forums/index.php?topic=4931.msg25982#msg25982
Function: Checks two values. If they match, display some sample text. If they mismatch, display different sample text.
Arguments: @if@[data||matchWith||matchedResult||FailResult]
Possible Uses: You could use this for a coin flip to rewrite the RNG roll as "Heads" or "Tails".
Example command:
!coin
[Coin Flip!] Result: @if@[@rand@[1,2]||1||Heads||Tails]
If a user invokes this command and a "2" is rolled, they will see this:
[Coin Flip!] Result: Tails
Note that if you leave out the last argument (In this case, ||Tails) the @if@ statement will display the input data instead of any user-specified text if it mismatches.
Example:
!coin
[Coin Flip!] Result: @if@[@rand@[1,2]||1||Heads]
If a user invoked this command and a "2" was rolled instead of a "1", this text would be displayed:
[Coin Flip!] Result: 2
-
(Sorry for the late response.) Thank you for the detailed explanation! :)