Command can have some scenarios with BJS code.
Example. Calculating 2+2 and send result to the chat:
On command executing, its scenarios are executed sequentially and isolated.
In BJS, you can use all the usual JS functions except setTimeout, setInterval