ZymiLog in
Pages
Custom commands

Examples

Five commands to build yourself or adapt. Each one shows a different part of the editor. The last one puts several of them together.

/verify: a verification role

Members run /verify to get the Verified role and see the whole server. If they already have it, the command says so.

/verify
/verify
  1. Name verify, no parameters, Who can run it: everyone.
  2. Checks: keep the defaults, and limit it to 3 times in 10 minutes.
  3. Add If, When: A member has roles, Member: Who ran the command, Roles: Verified.
  4. Under Yes, add Stop with "You are already verified."
  5. Under No:
    • Give or take roles: Give roles to Who ran the command, Verified.
    • Reply, Only the user sees it: "Welcome, {author}! You can see every channel now."
    • Message to a channel, #welcome: "Say hi to {author}!"

/roles pick: self-roles from a list

Verified members pick a role that shows what they do.

/roles pick
/roles pick
  1. Group roles, Name pick, Who can run it: Verified.
  2. Add a parameter role, Pick from a list, with the choices artist, gamer and writer.
  3. Add By choice, By: {role}. In each branch, add Give roles to Who ran the command with the matching role.
  4. Under Other, add Stop: "Pick a role from the list."
  5. Under the By choice block, add a Reply, Only the user sees it: "Done: you have {roles} now."

To let members drop a role, make /roles drop the same way with Take roles.

/staff event: an announcement with parameters

The event team posts an event in a channel they choose, as an embed.

/staff event: three parameters
/staff event: three parameters
  1. Group staff, Name event, Who can run it: Event team.
  2. Parameters:
    • where, Channel, required. (Not channel: that name is built in.)
    • title, Text, required.
    • host, Member, optional.
  3. Add Message to a channel, Where: The channel in {where}. Tick Add an embed: Title {title}, Description "Hosted by {host}.", Picture: Avatar of who ran it.
  4. Add a Reply, Only the user sees it: "Posted in {where}."

Members of the event team can only post in channels where they could post themselves.

/hello: a greeting with an optional member

Greets a member privately if one is given, and answers in the channel if not.

/hello
/hello
  1. Name hello, a parameter member, Member, optional.
  2. Add If, When: A parameter is filled in, Parameter: {member}.
  3. Under Yes, add Direct message to {member} with an embed: "Hello from {server}!", "{author} says hi ๐Ÿ‘‹".
  4. Under No, add Random reply with a few greetings, like "Hey {author} ๐Ÿ‘‹".

/giverole: who may give which role

A bigger one: staff give members a role from a list, and each role has its own givers. Art leads and staff may give Artist; only staff may give UwU. Anyone else is refused. It puts a By choice block and an If block inside each other.

/giverole: a By choice block with an If block in each branch
/giverole: a By choice block with an If block in each branch
  1. Name giverole, Who can run it: everyone. Who may give what is checked inside, per role.
  2. Parameters:
    • user, Member, required: who gets the role.
    • role, Pick from a list, required, with the choices artist and uwuify.
  3. Checks before role changes: keep the defaults. Zymi then gives only roles below the runner's own, never roles with moderation rights, only to members below the runner, and logs every change.
  4. Add By choice, By: {role}. It gets a branch for each choice and Other.
  5. In the artist branch, add If, When: A member has roles, Member: Who ran the command, Roles: Art Lead, Administrator, Moderator, Has: Any one of them.
    • Under Yes: Give or take roles, Give roles to {user}, Artist. Then a Reply: "โœ… Role {roles.name} has been given to {user}."
    • Under No: Stop with "โŒ You can't give the {role} role."
  6. Build the uwuify branch the same way, with Administrator and Moderator only, and the UwU role.
  7. Under Other, add Stop: "Pick a role from the list."

Two things to know when you build one like it:

  • In the No branch, write {role}, the choice that was picked, not {roles.name}. {roles} and {roles.name} list the roles of the Give or take roles blocks the command went through, and on that path there was none, so they would be empty.
  • If and By choice can't go deeper than three levels, and a command has up to 40 blocks. With many roles, keep the branches short, or split the command in two, for example /giverole art and /giverole fun in one group.

To add a role later, add a choice to role: a new branch appears in By choice, ready for its own If.