Advanced Conditional

Conditionally run code based on a complex comparison.

This block uses the same conditionals as the If Statement

Inputs

This block does not have any inputs.

Outputs

This block does not have any outputs.

\

Examples of Advanced Conditional

Sometimes a simple If Statement is not enough and you need something that’s able to handle more advanced conditionals, below are a few examples of how to use the block in a few different configurations. There are far more you can do, this is just a basic example of how to use some more advanced features

Any of the Following

This image shows how to use the Advanced Conditional block in an Any configuration where the executing user can either be @zammer8 or @FBI based on the IDs in the Value 2 slow for each row. If either @zammer8 or @FBI press the triggering button (based on trigger and variable in the first value for each row), anything inside the conditional will execute

All of the following

This image shows the basics of how to use the Advanced Conditional in the All configuration. The Advanced Conditional in this case checks if the server is owned by @magicbotmanand the user pressing the button is @FBI. Advanced Conditionals in the All configuration can be thought of as several If Statements in a row because all of them need to be true to execute

Combination

This example is where the name Advanced Conditional really comes into play. In the above image, the block is checking for both the All and Any configuration. Notice how the All of the following is the one at the very top meaning the entire block is set to check if all the conditionals are true.

Conditional 1: Bot’s ID = 1250528195858665493

Conditional 2: Executing user is server owner

Group 1: Set to Any of the following meaning at least one has to be true for the group to be true (see `Any of the following`)

G1 Conditional 1: Executing user ID = 624726512075276308

G1 Conditional 2: Executing user ID = 1191049693485076651

Looking at the IDs and reading the logic, a block in this configuration means that only @FBI and @zammer8 can only use the blocks inside the Advanced Conditional in a server owned by them on a bot with the ID of 1250528195858665493 (ReWork, for those wondering)