Button Verification

Project Overview

We'll be making a simple button verification flow. Your bot will send an embed message with the button. When the button is clicked, the member will be admitted to the server!

Completed project:

Prerequisites

You should configure your server permissions so that all channels are hidden except for one #verification channel. Then create a  @Verified role that allows access to those channels again.

WARNING

Make sure your bot's highest role is above the @Verified role! Otherwise your bot won't be able to assign it!

Embed Sending Flow

  • Create a new flow called “Send Button Verification Message” and give it an Empty Trigger.
  • Add an Embed Button Builder block and fill in the information as you choose. Make sure Button1 Style is set to either PRIMARY (for a blue button), SUCCESS (for a green button), or SECONDARY (for a gray button). Set the button ID to verify

  • Add a Send or Edit Embed Message block. Set the channel ID to the ID of the #verification channel and fill in the details as you choose.

  • Add the Embed Button Builder output to the Send or Edit Embed Message block's “Buttons” input

  • Manually trigger the flow. Click the three dot menu by the flow name, then click Manually Trigger. Hit “Trigger" (you don't need to fill in any of the fields!)

  • Your bot should now have sent the embed message you just made. The button doesn't work though! We'll fix that in the next section!

Section Resources

  • Completed flow - Be sure to replace the channel ID in the Send Embed Message block with your own!

Button Click Flow

  • Create a new flow called “Button Verification Click Handler" with a trigger of Button Click. Set the button ID to be verify

  • Add an Assign Role block. Set Server ID to be the Server ID output from the trigger. Set User ID to be the User ID output from the trigger. Set Role ID to be the ID of the @Verified role.

  • Add a Text Reply to Interaction block with Message Content of whatever you choose.

  • Go back to your #verification channel and click the button. You should get the @Verified role!

Section Resources

  • Completed Flow - Be sure to replace the Role ID in the Assign Role input with your @Verified role ID!