Button Roles
Buttons and Actions
Every button runs an ordered chain of role actions: add, remove, toggle, and timed.
A button does whatever its action chain says, in order, on every click. One button can run several actions, so a single click can add some roles while removing others, exactly the stacking that reaction roles allowed.
Action types#
| Type | What a click does |
|---|---|
| Normal (add) | Gives the role. Does nothing if the member already has it. The default for new actions. |
| Remove | Takes the role away. |
| Toggle | Gives the role if the member lacks it, removes it if they have it. The classic on/off button. |
| Timed | Gives the role, then Zira removes it automatically after a set duration. |
Add actions to a button from its editor with + Action, pick the type, and choose the role. Drag actions to reorder them within the chain.
Stacking example#
Say clicking Verified should grant @Member, remove @Unverified, and toggle @Notifications. That is one button with three actions:
1. Add @Member
2. Remove @Unverified
3. Toggle @Notifications
The member gets a single ephemeral reply listing everything that changed.
Timed actions#
A Timed action grants a role that expires on its own. Pick the role and a duration like 1d, 12h, or 2w.
Timed actions follow Zira's unified timed-role limits: up to 14 days on free servers, up to 365 days with Premium. This is the same limit as the /timed command.
Expiry is durable: even if Zira restarts, the role is still removed on schedule.
Per-action conditions#
Each action can carry a condition so it only runs when the member's roles match.
A condition checks that the member has and/or lacks a set of roles, matching all or any of them. For example, a "claim reward" button could grant @Tier 2 Reward only if the member has @Tier 2, while the rest of the chain runs for everyone. Conditions are evaluated per action, so different actions on the same button can have different conditions.
Conflicts#
If a chain ends up both adding and removing the same role, the result is computed once and applied as a single edit, so a button never fights itself. Group rules (next page) are resolved into the same single edit.