BDFD Verification

BDFD Verify System

A DM-based 2-step verification system for BDFD. Generates a random 6-digit code, sends it via DM and grants a role once the user enters the correct code in the server.

Features

DM Verification 6-Digit Random Code Role Assignment Auto-Delete Messages Staff Log Code Expiry on Use

1. Verify — Request Code

Generates a random 6-digit code, saves it to the user variable and sends it to the user via DM.

TRIGGER <prefix>verify
$nomention
$c[--- Generate 6-Digit Code ---]
$var[code;$random[100000;999999]]
$setUserVar[verify_code;$var[code]]

$c[--- DM the User ---]
$dm[$authorID]
$title[🛡️ Verification Code]
$description[Your unique verification code is: **$var[code]**

Go back to <#1479083988034261035> and type:
`!code $var[code]`]
$color[#2ecc71]

📬 <@$authorID>, this is your code don't share it!
$deletecommand
$deleteIn[10s]

2. Submit Code

Compares the entered code to the saved user variable. Grants the role on success, resets the code and logs to a staff channel.

TRIGGER <prefix>code
$nomention

$c[--- Check if they have a code assigned ---]
$onlyIf[$getUserVar[verify_code]!=0;❌ You haven't requested a code yet. Type `!verify` first!]

$c[--- Compare Input ($message) to Saved Code ---]
$if[$message==$getUserVar[verify_code]]
  $giveRole[$authorID;ROLE_ID]
  $setUserVar[verify_code;0]
  
  ✅ Verification successful! Access granted.
  $deletecommand
  $deleteIn[5s]
  
  $c[--- Staff Log ---]
  $channelSendMessage[CHANNEL_ID;📥 **Verification Log** | <@$authorID> has successfully verified using the DM code.]
$else
  ❌ Incorrect code. Please check your DMs and use `!code [numbers]`.
  $deletecommand
  $deleteIn[3s]
$endif

Variables Needed

verify_code 0

Credits

JX
@jxy_y
Script Creator

If you repost or redistribute this, please give proper credits to the original creator.

Setup Notes

ROLE_ID

Replace ROLE_ID in <prefix>code with the ID of the role that should be granted after verification.

CHANNEL_ID

Replace CHANNEL_ID in <prefix>code with your staff log channel ID.

Verify Channel

Replace 1479083988034261035 in <prefix>verify with your verification channel ID.