# Token Gating

Our Discord bot verifies token ownership to easily grant a **token holder role** to your Discord community members.&#x20;

<figure><img src="/files/SDSQu4Zzfleni8jhJ8Pe" alt="" width="554"><figcaption></figcaption></figure>

**Here's what you'll need:**

* A Discord server with your desired role structure (the HeyMint bot's role must be above the selected role in the Discord role hierarchy. Otherwise, the bot will be unable to assign the role. )

<figure><img src="/files/09r7zCpkDjvtqQNYSf6E" alt=""><figcaption></figcaption></figure>

* A [HeyMint account](/create-an-allowlist.md) and an existing allowlist project

<figure><img src="/files/bpgioyVB7SL6n1FWZhvf" alt=""><figcaption></figcaption></figure>

### Steps

#### **Step 1: Discord Token Gating**

a. In your HeyMint allowlist, navigate to the **Discord** tab.

b. Click on **Token Gating** and then **Start Here**.

<figure><img src="/files/cXbjTVFOhDtFE5wZfA47" alt=""><figcaption></figcaption></figure>

c. Choose your preferred login method (Google or Discord).

<figure><img src="/files/lFneZaL5grzAyO5qYtDb" alt=""><figcaption></figcaption></figure>

#### **Step 2: Connect & Authorize HeyMint Bot in Discord**&#x20;

(This step will involve granting permissions to the HeyMint bot within your server.)

#### **Step 3: Configure Token Gated Role**

a. Select the Discord server where you want to apply token gating.

b. Choose the onboarding channel (where users will connect wallets to verify ownership) and then click on "Post onboarding message".

<figure><img src="/files/6RfSKaxGhCphr2gGjFsV" alt=""><figcaption><p>Select onboarding channel</p></figcaption></figure>

<figure><img src="/files/gOSsnhbSA2XQ1gQqyNHT" alt=""><figcaption><p>Post onboarding message</p></figcaption></figure>

c. Go to the **Role Verification** section, select which ecosystem your community is in (Ordinals, BRC-20, EVM NFT for EVM chains like ETH, Polygon, Base etc, or RUNE), and then configure your role verification settings.

<figure><img src="/files/PtxPP8ZO4DmKJRAKrSBz" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/R4mgqdLvWGA7sHnEUUWV" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
*Please be sure that the bot's role is above the selected role in the Discord role hierarchy.*&#x20;

*Otherwise, the bot will be unable to assign the role.*

<img src="/files/09r7zCpkDjvtqQNYSf6E" alt="" data-size="original">
{% endhint %}

<figure><img src="/files/NxIeokCvspqbw46IGlZV" alt=""><figcaption></figcaption></figure>

#### **Step 4: Spread the Word**&#x20;

Let your collectors know they can automatically receive the holder role you set (you can set any name for the role in the settings above) by connecting their wallets to the bot in your Discord server.&#x20;

<figure><img src="/files/SDSQu4Zzfleni8jhJ8Pe" alt="" width="554"><figcaption></figcaption></figure>

#### **Step 5: Refresh roles**&#x20;

After connecting the wallet holding the token, users can click on the "Refresh roles" button for their role/s to be added.

<figure><img src="/files/tHau0HIzwlNmmxwJYJaP" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.heymint.xyz/discord-bot-integration/token-gating.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
