> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dogebot.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify new members

> A Verify button with a secret word, roles and a log.

> **What you'll build**
>
> New members can only see a **verify** channel. They press **Verify**, type a secret word, and get the **Verified** role so they can see the whole server. This stops simple spam bots.
>
> * An event gives every new member the **Unverified** role.
> * `/verify-panel` posts the Verify button.
> * The button asks for the word, gives the role, counts it and logs it.

## Before you start

**1. Make two roles in your Discord server**

* **Unverified**: can only see the verify channel.
* **Verified**: can see everything.

**2. Move your bot's role up**

Move your bot's role **above** both of them in the role list.

**3. Turn on the Server Members Intent**

Join events need it. In the Discord Developer Portal, open your bot, open **Bot**, and switch on **Server Members Intent**.

## The variables to make

| Name | Type | Where it's kept | Starting value | What it's for |
| - | - | - | - | - |
| `verified-count` | **Number** | Server Specific | `0` | How many people have verified |

## Give Unverified on join

**1. Make a new event**

Open **Events**, press **New Event**, search for `join` and pick the event for **when a member joins**.

![The event picker](https://mintcdn.com/doge-bot/0C6-zgXTpDx1QOCe/images/guide/event-picker.png?fit=max\&auto=format\&n=0C6-zgXTpDx1QOCe\&q=85\&s=9a4a944abf5b2a65384e22c7f4386887)

**2. Give the role**

Add **Give roles** and pick **Unverified**.

**3. Save and switch it on**

Press **Save** and switch the event **on**.

## /verify-panel

**1. Make the command**

A **Slash command** called `verify-panel`.

**2. Staff only**

Add the check that looks at **permissions** (search `permission`) and pick **Manage Server**. Under its **Else** block: **Reply** `Only staff can post the panel.`

**3. The panel: straight under the check**

Add a message block that has a **button** (search `button`). Write a title like `Welcome!` and text like `Press Verify to get in.` Add one green button called **Verify**.

## What the Verify button does

Every button has its **own blocks** that run when someone presses it. Under the **Verify** button:

**1. Already verified?**

Add the check on the **roles** of the person who pressed it (search `role`): do they have **Verified**? Straight under it: **Reply** privately `You're already verified.`

**2. Ask for the word: under the Else block**

Add a **pop-up form** (search `pop-up`). Call the form `verify` and give it one short text box called `word`, with the label `Type the word doge to get in`.

**3. Check the word**

After the pop-up, add **Compare**: is `{verify.word}` equal to `doge`?

**4. Right word: straight under the Compare**

1. **Give roles**: **Verified**.
2. The block that **removes roles** (search `remove`): **Unverified**.
3. **Do the maths** on `verified-count`: `var + 1`.
4. **Reply** privately: `You're in! You are verified member number {DBVAR_verified-count}.`
5. A message to your **log channel** (search `channel`): `{user_name} verified.`

**5. Wrong word: under the Else block**

**Reply** privately: `That's not the word. Try again!`

**6. Save**

Press **Save**.

> [!NOTE]
>
> Want it even easier for members? Skip the pop-up and Compare, and give the role straight away when they press the button. See [Pop-up forms](/building-with-blocks/pop-up-forms) for more about forms.

## Post the panel

Go to your verify channel and type `/verify-panel`. Done!

## Try it

> [!TIP]
>
> 1. Join with a second account. It gets **Unverified**.
> 2. Press **Verify** and type a wrong word. The bot says try again.
> 3. Press **Verify** and type `doge`. You get **Verified** and can see the server.
> 4. Your log channel says who verified.

Nothing happens? Check the event is **on**, the bot's role is above both roles, and look in [Error Logs](/your-bot/error-logs).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.