BotFrame
Skip to content

Custom workflow walkthrough

Build a verification button without toggling access off.

This recipe grants a chosen role after a button click. Unlike the notifications template, clicking twice should leave the member verified. Build it on an empty graph or adapt an existing workflow deliberately.

Custom verification workflow open in the BotFrame editor

1. Prepare the role and channel

Create a Verified role in Discord with only the access you intend to unlock. Put it below the bot’s role. Keep the verification channel visible to people without Verified; otherwise they cannot reach the button.

2. Post a button

Use a moderator-only setup command connected to Send components. Add a button labelled Verify with the Custom ID verify_member. Write a short message explaining which access the click grants. Protect this setup command with a permission check.

3. Match the button and check the member

Add Button or select used with the same Custom ID. Connect it to Member has role for Verified, then connect that result to a Condition.

  1. Verify click
  2. Already has Verified?
  3. False: Add role → reply
  4. True: Already verified reply

4. Grant once and reply on both paths

On the false branch use Add role for Verified, followed by Send message targeting the interaction. On the true branch reply that access is already present. Do not use toggle mode for this one-way grant.

5. Check first, repeated and unrelated clicks

Verification test cases
CaseExpected outcome
Member without Verified clicks VerifyVerified is added and a confirmation is sent.
Verified member clicks Verify againThe role remains; the existing-access reply runs.
Member clicks another buttonThe verification flow does nothing.
Bot cannot manage VerifiedRole assignment fails; fix Discord permission or role order.

Use the simulator walkthrough before a live test. This verifies an interaction, not someone’s age or identity. For a ready-made opt-in role instead, use Self-serve roles.