> For the complete documentation index, see [llms.txt](https://tg-token-gates.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tg-token-gates.gitbook.io/docs/bot-setup/setup-bot-permissions.md).

# Setup Bot Permissions

The correct permissions allows the bot to enforce gates, purge members, and manage entry messages.

***

### Step 1: Add the bot to the chat(s)

The bot must be added to ALL of the chats you have created.

**IF** you chose **"Channel"** or **"Group"**  you will add the bot to 2 chats.\
**("Gated chat" & "Entry Channel")**

**IF** you chose **"Channel & Discussion Group"**  you will add the bot to 3 chats.\
**("Gated Channel" , "Gated Discussion Group" & "Entry Channel")**

1. In each chat, find & select the button for "Manage Group" or "Manage Channel". (Button location differs from device to device)\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FZl6sKZDpLNNIoTrl8gsd%2Fimage.png?alt=media\&token=f95d9cc7-3a85-476b-955b-03d8736864bf)
2. Select **"Administrator"** from the options\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FBOB8WwBHjzwFopQQvW6U%2Fimage.png?alt=media\&token=c344895e-481e-42ef-b0cf-2a84171bcf69)<br>
3. Click **"Add Administrator"**\
   \
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FNhaquR1dk5ua6Dtp3Fny%2Fimage.png?alt=media\&token=95817938-00a6-495c-a788-84574108b339)
4. Search for **@tg\_token\_gates\_bot** then select the bot\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FKVsJ6hFBC0WT3KZ36jRm%2Fimage.png?alt=media\&token=3490bb9f-7a26-446f-9ea6-3e95792c921c)
5. Leave the basic settings & click **"Save"**\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FLGu7uIjgf9LSirfeGUa6%2Fimage.png?alt=media\&token=cbdd395d-a89b-4298-b840-c1228dbf2a5c)
6. You should now see the bot is added as admin. Click **"Close"**.\ <img src="https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FAMBBdamEsxnkekpROsNh%2Fimage.png?alt=media&amp;token=a60079fa-a738-4830-a366-b77b987a454b" alt="" data-size="original">
7. "Save" your chat\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FewoPbKDTZGcETqdUo9qM%2Fimage.png?alt=media\&token=4acd3e5c-313a-454c-9231-45044fd14a3a)

***

#### **ONLY If You Are Gating a Group...**

In order to gate a **group** (or **discussion group**), you'll need to convert your group into a **supergroup.**\
\
During this process the bot will send the following messages into your group to assist you.

NOTE: If you are using a discussion group telegram automatically converts it to a supergroup and you may already [see this confirmation message in the chat](#confirmation).

<div align="left"><figure><img src="https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FL9cGdS6lGH6X613M67m9%2Fimage.png?alt=media&amp;token=ff146f3f-a521-4a13-9650-2870532b8f00" alt="" width="563"><figcaption></figcaption></figure></div>

### How to convert into a supergroup&#x20;

Below are **2 options to convert your group** into a supergroup. You only need to complete one.\
\
**Option 1:** [Change Settings for "Chat history](#option-1-change-settings-for-chat-history)\
**Option 2:** [Turn on "Slow mode"](#option-2-turn-on-slow-mode)\
**Confirmation**: [How to confirm](#confirmation).

#### **Option 1 – Change Settings for "Chat history"**

1. Go to "**Manage Group"**.\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FLUKOBYYU76oNiTgniTg3%2Fimage.png?alt=media\&token=d7ef2ff9-ddf6-42d7-a7f0-aadeb698eee9)<br>
2. Select **“Chat history for new members”** from the options\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2Fnvk0G7u9dGa24k0ecBob%2Fimage.png?alt=media\&token=9dbaf6c8-8946-4a85-8c9f-70eea0282f2c)
3. Select **"Visible"** then click "**Save"**\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FtrMraLzbTc75RcBPrIZz%2Fimage.png?alt=media\&token=5c0dc402-cbf6-4324-9b5a-638d5844f9fd)
4. Click **"Save"**.\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2F5q6Wz8y51NackViI7Rt1%2Fimage.png?alt=media\&token=93899384-5308-4d02-b071-eb3fd615600d)

#### **Option 2 – Turn on Slow mode**

1. Go to **"Manage Group"**

   <div align="left"><figure><img src="https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FbetKf0qrX6FyOHZHol7N%2Fimage.png?alt=media&amp;token=39b1ec23-305f-4df0-9969-5981ed3ca9f4" alt=""><figcaption></figcaption></figure></div>
2. Select **"Permissions"** from the options\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2F9ZFo5X3PrwAUEcLvmahp%2Fimage.png?alt=media\&token=cad2fd59-8604-4210-870a-d0fa9cbf4469)
3. Turn on **“Slow mode”**.\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FM43GByfb2bRFAqQauX1O%2Fimage.png?alt=media\&token=67bb10d6-f38e-4b50-99b5-9e9b3920f5ff)
4. Click **Save**.\
   ![](https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2F5jdyxiiDoU8lKum9LjJR%2Fimage.png?alt=media\&token=d56e1c77-8fc1-446a-a779-fadf79ae27bf)

#### **IMPORTANT**

Once this has been done correctly the bot will send a confirmation message into your group.

When a group becomes a supergroup all bots lose admin rights, so you need to re-add the bot as an admin.

#### **Confirmation:**

<figure><img src="https://4091296668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgpdBpq3fWRRplh4OcmGe%2Fuploads%2FOwAwhzFLf30VqE2clIZo%2Fimage.png?alt=media&amp;token=369cbb9d-fc60-4df6-a299-831f1d516699" alt=""><figcaption></figcaption></figure>

***

Once the bot is an admin in **all relevant chats** including your **"Gated Chat(s)"** and your **"Entry Channel"** you’re ready to run `/setup` and **Create a Gate**.
