Starts with a select menu

Role menu

With a dropdown in #roles, members add a game role by picking it and drop it by picking it again, so nobody on your team has to hand roles out. The menu only gives out the roles you put on its list.

Illustration. The real interface may look different.

How it works

  1. /role-menu posts the message with the dropdown.

  2. When a member picks a role, the bot checks it against your list of allowed roles.

  3. If the member already has the role it is removed, otherwise it is added.

How to make a role menu on Discord

The menu is a permanent message. Each pick starts a fresh run that checks the role against your list before it touches the member.

Describe it to your AI assistant

I'm done handing out game roles by hand. Build a role menu module: /role-menu, for members with Manage Roles, posts a message in #roles with a dropdown for the roles Minecraft, Valorant and Art. Picking a role adds it, picking it again removes it, and the bot answers privately with what changed. Check every pick against the three roles from the settings so the menu can never give out any other role. Make the channel, the intro text and the three roles settings.

Copy it and swap in your own channel and role names. Your assistant has a tested version of this example to start from.

Build it in the editor

Two flows: /role-menu posts the message with the dropdown once, and a "Dropdown submitted" trigger handles every pick. The dropdown names its flow, so the menu still works months after it was posted.

The 2 flows, step by stepStep names are the ones the editor shows.

Flow 1/role-menu

Trigger: Slash command/role-menu, limited to members with "Manage roles". You run it once.

  1. Create dropdownCreates the dropdown.
  2. Set dropdown target flowPoints it at the flow that handles the picks.
  3. Add option to dropdownAdds one option per role from your settings.
  4. Create messageBuilds the message with your intro text and the dropdown.
  5. Send messagePosts it in the menu channel.

Flow 2A member picks

Trigger: Dropdown submittedfrom the dropdown, whenever someone uses it.

  1. Check and set cooldownRefuses a member who used the menu a few seconds ago, so fast clicks cannot half-apply a change.
  2. For each itemGoes through every role the member picked.
  3. Is one ofSkips anything that is not on your list of roles.
  4. Member has roleLooks up whether the member already has the role.
  5. Remove role from memberIf so, takes it away.
  6. Add role to memberOtherwise adds it.
  7. Reply to interactionTells the member privately what was added and what was removed.

Test it, change it

What it stores

  • Apply cooldownPer userPer member: when they may use the menu again. Nothing else is stored, since the roles themselves live in Discord.

How to test it

  1. Open a flow in the editor and click "Test run". Choose the member under "Run as" and click "Run test". The run uses your real server data but sends, changes and deletes nothing, and shows what each step would have done.
  2. A new flow is a "Draft" and does not run in Discord. Switch it on and click "Save & activate".
  3. In Discord, run /role-menu, pick a role with a second account and pick it again. The role should appear and disappear in the member list.
  4. Each real run then shows up under "Executions", with the reason if it failed or was skipped.

What to change

Roles
The three role settings in the module's "Configuration" tab. Post the menu again afterwards, because an old menu keeps its old options.
Channel
The "Menu channel" setting.
Wording
The "Menu intro" setting.
Picks at once
"Roles per pick" sets how many roles a member can choose in one go.

Watch out for

  • Your bot needs "Manage roles", and its own role has to sit above every role on the menu. This is the usual reason a role menu does nothing.
  • The tested version has three role slots. A fourth role needs a fourth setting and a fourth option.
  • Delete old menus when you change the roles. The flow refuses roles that left the list, but members still see them in the old dropdown.

Questions about this build

Why does the role menu not give the role?

Almost always the bot's role sits below the role it should give. In Server Settings, drag your bot's role above the menu roles and check that it has "Manage roles".

Can I use buttons or reactions instead of a dropdown?

Buttons work the same way: a "Button clicked" trigger per role. For reaction roles, the welcome module that comes with your bot has them ready.

Can members pick more than one role?

Yes. "Roles per pick" allows up to three in one go in the tested version, and a member can come back to the menu as often as they like.

Quer seu servidor no beta?

A V3 é um sistema grande e ainda muda rápido, então os servidores entram um de cada vez, não todos de uma vez. Cada inscrição é lida por uma pessoa, e você recebe a resposta em poucos dias.

Os servidores que já estão no beta decidem boa parte do que construímos a seguir. O que você criar é seu: flows e módulos ficam quando o beta acabar.