Roles & menus
kesarAI gives members a self-service way to pick up roles and gives staff two enforcement tools that hold a role decision in place even when someone tries to undo it. Self-assignable role menus are an admin-built panel anyone can click; permanent roles and role bans are background watchers that re-apply or strip a role the moment it changes.
Overview
There are five independent systems on this page. Role menus let members add and remove roles themselves from a button or dropdown panel — building them needs Discord Administrator. Permanent roles guarantee a member keeps a role: remove it and the bot puts it back. Role bans are the inverse: a member is blocked from ever holding a role, and if it is added the bot removes it. Sticky roles give members their roles back when they leave and rejoin. Booster roles let people who boost the server make and keep a role of their own.
The permanent-role and role-ban commands are not gated by Discord’s native permissions. They use kesarAI’s own per-role mod-permission grid — the perm_role permission for permanent roles and the roleban permission for role bans, both set with /modpanel. A single command, /permrolepersist, is bot-owner-only. See permission tiers for the full model.
Every system here honours Discord’s role hierarchy: the bot can only assign or remove roles below its own top role. A role above the bot cannot be put in a menu, made permanent, enforced as a ban, or given as a booster role.
Self-assignable role menus
A role menu is a panel the bot posts to a channel. Members click a button or pick from a dropdown to toggle their own roles — no staff involvement after setup. The layout is chosen automatically: five roles or fewer render as buttons, six to twenty-five render as a dropdown. Each menu has a mode that decides how clicks behave:
- Toggle — click to add a role, click again to remove it.
- Exclusive — only one role from the menu at a time; picking a new one swaps out the old.
- Add only — members can grant themselves a role but cannot self-remove it.
Menus are built and managed through the /rolemenu command group, which is Administrator-only. Creating a menu opens an interactive setup panel where you select the roles, choose the mode, customise the title and description, and pick the channel to deploy to. Panels survive bot restarts, so the buttons keep working indefinitely. There is a limit of twenty-five menus per server.
Every self-assign and self-remove through a menu is written to the audit log under the Moderation category, as is creating, editing, or deleting a menu.
Permanent roles
A permanent role is one the bot guarantees a member keeps. If anyone — another bot, a moderator, or the member themselves — removes the role, kesarAI re-adds it almost immediately. The role is also re-applied automatically when the member rejoins the server, and a startup sync re-checks every tracked member after the bot restarts, so nothing is lost across a crash.
Removing a role from the permanent list does not remove the role from the member — it only stops the protection. A role cannot be both permanent and banned for the same member; the bot blocks the conflict and tells you which command to run first. Granting a permanent role also passes through anti-nuke clearance, so a non-whitelisted mod cannot launder a dangerous-permission role grant through it.
The permanent-role commands are gated by the perm_role mod permission. /permrolepersist is the exception: it is bot-owner-only and controls whether a server’s permanent-role and role-ban data is kept if the bot is removed from the server.
Role bans
A role ban blocks a specific member from ever holding a specific role. If the role is added to them by any means, the bot removes it right away. The same recovery paths as permanent roles apply: bans are re-checked when the bot restarts and enforced when the member rejoins.
Removing a role ban does not grant the role — it only lifts the block. As with permanent roles, a role cannot be both banned and permanent for the same member at once. Role-ban commands are gated by the roleban mod permission.
Sticky roles
When a member leaves, Discord removes all their roles. With sticky roles on, kesarAI saves the member’s roles when they leave and gives them back when they rejoin.
The default. Sticky roles is off unless kesarAI gives your auto-roles: join roles on the Welcome page, or the ticket system’s role on join. Once you turn it on or off yourself, your choice wins.
Jail and quarantine always stick. A member jailed by anti-nuke goes straight back to jail when they rejoin, and a member quarantined with /q goes back into quarantine. This happens even when sticky roles is off, their saved roles have expired, or their username changed. kesarAI also checks its audit log, so a member who was quarantined when they left goes back in even if their leave wasn’t saved. Leaving is never a way out.
The order. On rejoin, kesarAI picks one outcome, in this order:
- Jailed: straight back to jail.
- Quarantined: straight back into quarantine, never with a verified role. Their other saved roles come back only while sticky roles is on and they haven’t expired.
- Their saved state: verified or unverified per the Verification setting below, plus their other saved roles. Join auto-roles that don’t fit are removed.
- Otherwise (sticky roles off, saved roles expired, kicked or banned, or new to the server): treated as a new member, and auto-roles stay.
kesarAI also catches up on rejoins it missed while it was restarting.
Verification. The verified and unverified roles come from your verification setup. Choose what a member with saved roles comes back as:
- Keep how they left (the default). Verified members come back verified, unverified members come back unverified. A member who had neither role when they left comes back with neither, as they left. A member with no saved roles at all is treated like a new member.
- Always rejoin unverified. Everyone verifies again.
These roles follow this setting, not the Never sticky or Stick anyway lists. The setting needs your verification roles set up first. A server that put its verified role on the Never sticky list before this setting existed starts on Always rejoin unverified, so the verified role still doesn’t come back on its own.
What comes back, and what doesn’t:
- Expiry. Roles are kept for 7 days after the member leaves. Pick another number of days, or turn on Keep forever.
- Same username. If the member rejoins with a different username, only the roles you mark Stick anyway come back, and their verification is treated like a new member’s, so auto-roles stay. A new username can mean a different person on a recycled account. You can turn this rule off.
- Sensitive roles. Roles with admin or mod permissions, or kesarAI mod commands, are skipped unless you turn off Skip sensitive roles.
- Kicks and bans. Members who were kicked or banned come back with no roles, unless you turn on Restore after kick or ban.
- Auto-roles. A member who gets their saved state back loses any join auto-role that doesn’t fit, such as an Unverified role on a verified member. A member treated as new keeps their auto-roles.
- Level roles. kesarAI keeps a member’s XP when they leave, so their level roles are worked out again from their level.
- Permanent roles and role bans win. A role given with
/permroleis never taken off, and a role the member is role-banned from is never given, whatever the other rules say. One exception: while a member is quarantined, a permanent role that quarantine removes (such as a verified role) stays off, and it comes back when the quarantine ends. - Always skipped. Roles Discord manages (boosters, integrations, bots), roles above kesarAI’s highest role, roles on your Never sticky list, and roles the member is role-banned from.
Every restore is written to the audit log under Members, with the roles given back and the ones skipped. /privacy forget deletes a member’s saved roles but keeps any jail or quarantine, so it can’t be used to escape one.
Set it up on the Sticky roles dashboard page. Admins can change it; AI-tier mods can view it.
Booster roles
A member who boosts your server can make a role of their own. They run /boosterrole and get a private panel with a live preview of the role. You set the rules, and choose where the roles sit, on the Booster roles dashboard page. It is off until an admin turns it on there, and it can start with a short list of members to try it before every booster gets it. Admins can change it; AI-tier mods can view it.
What boosters can change. The name, the colour and the icon. For colour they pick a solid colour, a gradient or a holographic look, take the colour of their avatar, or get a random one. For the icon they upload an image or use an emoji, either a standard emoji or a custom one. Gradient and holographic colours show up only if your server has Discord’s enhanced role colours, and icons only if it has role icons. You can switch off any of these pieces. Names are checked against the same word list as /say, which you can turn off. That check is skipped when every change needs approval, because staff are the check then.
Approvals and cooldown. You can ask for approval on every change. Each change then goes to the requests channel as a card that shows what changes, before and after, with a preview image and Approve and Deny buttons. Anyone with Manage Roles can answer, and so can the member or role you choose to ping. The booster who asked, and anyone who shares their role, can’t answer their own request unless they are an administrator. The booster gets a message with the answer. Without approval, a change cooldown limits how often a booster can change the role. It is off by default, or anything from 1 hour to 30 days. Making the role for the first time doesn’t start it, and putting back the design that was already live is free. During a cooldown a booster can send a request to the requests channel instead. If you set no requests channel, they wait. The cooldown isn’t used while every change needs approval.
When a boost ends. The role stays for a grace period you choose, from none at all up to 7 days. The default is 24 hours. Boosting again in that time changes nothing. When it is over, kesarAI deletes the role and any roles it gave for boosting, but it keeps the saved design. If the member boosts again, the same role comes back with no approval and no cooldown. A role the member deleted themselves with Remove my role doesn’t come back by itself; the panel offers Restore my role. A role that staff deleted by hand stays gone until staff choose Allow again on the dashboard.
Where roles go. Booster roles sit together in one block, directly below a role you pick. The dashboard shows your server’s role list the way Discord does, with a glass marker you drag to the gap you want, or move with the arrow keys. It can snap only to a gap kesarAI can use, never above its own role. Moving the marker moves the whole block, and the page tells you how many roles moved and which ones kesarAI couldn’t move. A custom colour shows only when it is the member’s highest coloured role, so the page counts how many boosters have a higher one. Discord allows 250 roles per server, and kesarAI never uses the last 3, so you and anti-nuke can still make roles. When the server is full, the booster is told there is no room and your staff get at most one alert every 6 hours.
If your boosters already have personal roles, the page can adopt them. It suggests roles that have no permissions, one to three members, and exactly one booster among them. You tick the ones you want, and read what adopting does before you confirm. An adopted role follows the same rules, so it is deleted after the grace period when its member stops boosting.
Linked accounts. Staff can link up to 5 more accounts, such as a booster’s alts, to a booster on the dashboard. Only staff can do this. Linked accounts wear the role while the booster does, and can open /boosterrole and edit the shared role while the booster is boosting. They share the booster’s cooldown, and they can’t remove the role or answer requests. Unlinking takes the role off that account. An account that isn’t in the server yet can be added by its ID, and gets the role when it joins.
Roles for boosters and the server tag. Pick roles that every booster gets while they boost, such as image permissions. They are taken away at the same time as the custom role. You can also pick roles for members who wear your server tag. Those go 10 minutes after the member stops wearing it, so swapping tags doesn’t churn roles. kesarAI takes back only the roles it gave, so a member who also has one through an auto-role or a manual grant keeps it. The pickers refuse roles that Discord manages, roles at or above kesarAI’s, roles with dangerous permissions, level rewards, verification, quarantine and jail roles, and booster roles themselves. They warn about roles in a role menu or with a permanent-role entry.
You can also have kesarAI post a short thank-you in a channel when someone starts boosting. It never posts for a boost that began earlier. Two settings in Leveling give boosters and tag wearers extra XP.
Sticky roles never restores a booster role. kesarAI hands back whatever a member is owed when they rejoin, come out of jail or finish verifying, and a booster who is in jail or quarantine gets nothing until that ends. Every change is written to the audit log under Members, with who asked and who approved it.
Command reference
Role menus — the /rolemenu group, Administrator-only.
/rolemenu create— open the setup panel to build and deploy a new menu./rolemenu edit— re-open the setup panel for an existing menu by its message ID./rolemenu delete— delete a menu (and its message) by message ID./rolemenu list— list every role menu configured in this server.
Permanent roles — gated by the perm_role mod permission, except where noted.
/permrole— mark a role as permanent for a member./unpermrole— remove a role’s permanent protection (the member keeps the role)./permrolelist— paginated list of every permanent role in the server, with cleanup buttons./permrolecheck— show one member’s permanent roles and role bans, flagging any conflicts./permrolepersist— toggle whether this server’s data survives the bot leaving. Bot-owner-only.
Role bans — gated by the roleban mod permission.
/roleban— block a member from holding a role./unroleban— lift a role ban (does not grant the role)./rolebanlist— paginated list of every role ban in the server, with cleanup buttons.
Booster roles— for members who boost the server.
/boosterrole— make or change your own role: name, colour and icon. Staff set it up on the dashboard; there is no admin command.
