ZymiLog in
Pages
Custom commands

Conditions

Three blocks decide which blocks are done: If chooses between two branches, By choice has a branch for each choice of a list, and Stop ends the command.

Blocks can go inside the branches, including other If and By choice blocks, up to three levels deep.

If

An If block has two branches: Yes and No. Zymi checks the condition and does the blocks of one branch, then carries on under the If block.

If who ran the command has @Verified
If who ran the command has @Verified

Under When, pick one of three conditions:

A parameter is filled in

Yes when the member filled in the Parameter. Use it for optional parameters: for example, greet {member} if one was given, or the member who ran it if not.

A parameter is a value

Yes when the Parameter is the value under Is. Upper and lower case don't matter.

  • For a Pick from a list parameter, choose the value from its choices.
  • For a Role or Channel parameter, write its name.
  • For a Member parameter, write the member's ID.
  • For Text and Number, write the text or number.

A member has roles

Yes when the Member has the Roles: Who ran the command, or the member in a member parameter. With several roles, choose under Has whether Any one of them or All of them is needed.

Roles given or taken earlier in the same command count. So a command that first gives a role and then checks for it will find it.

By choice

A By choice block needs a Pick from a list parameter. Choose it under By, and the picture gets a branch for each of its choices, plus Other.

/roles pick: a branch for each choice, and Other
/roles pick: a branch for each choice, and Other

Zymi does the blocks of the branch that was picked. Other is done when nothing was picked, for an optional parameter.

When you remove a choice from the parameter, its branch stays, marked no longer a choice, until you empty it. Nobody can pick it any more.

This is shorter than a row of If blocks, and it keeps each choice's blocks together: give a role, check who may, reply.

Stop

Ends the command. Nothing after it is done, also not the blocks that come after the If or By choice it sits in. Blocks before it are still done.

  • Message: what the member sees. Only they see it. Placeholders work.

A Stop inside an If is the usual way to refuse: If the member already has the role, Stop with "You already have it." Put such checks first, so the command stops before it does anything.