> For the complete documentation index, see [llms.txt](https://docs.membercounter.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.membercounter.app/getting-started/adding-bot-to-the-server.md).

# Adding the bot to your server

Invite Member Counter to your Discord server and understand every permission it asks for.

You need the **Manage Server** permission in the Discord server you are adding the bot to. If you do not have it, ask an administrator to follow these steps.

{% stepper %}
{% step %}
**Open the invite page**

Use the [direct invite link](https://membercounter.app/invite), or [log in to the dashboard](https://membercounter.app/dashboard), pick a server in the list on the left and press **Add to \<server name>**.

Without **Manage Server** the dashboard offers **Copy invite link** instead. Copy it and send it to an administrator.

<figure><img src="https://1582170640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lu2S5r7lKtu4IK5ucu9%2Fuploads%2Fgit-blob-dd8e084ad6e8b4847323150f9befd7be1d6c0f1e%2Fdashboard-add-to-server.png?alt=media" alt="The dashboard invite page with the Add to server button"><figcaption><p>The dashboard offers to add the bot to the selected server</p></figcaption></figure>
{% endstep %}

{% step %}
**Choose the server**

Discord asks which server the bot should join. Only servers where you have **Manage Server** appear in the list. Pick yours and press **Continue**.

<figure><img src="https://1582170640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lu2S5r7lKtu4IK5ucu9%2Fuploads%2Fgit-blob-9c101d10c9210dc88a84a53b13e6b0d99db2228e%2Fdiscord-invite-server-picker.png?alt=media" alt="Discord&#x27;s authorization dialog with the server dropdown open"><figcaption><p>Discord asks where to add the bot</p></figcaption></figure>
{% endstep %}

{% step %}
**Review the permissions and authorize**

Discord lists the permissions the bot asks for. Uncheck the ones the table below marks as not required, then press **Authorize**.

<figure><img src="https://1582170640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lu2S5r7lKtu4IK5ucu9%2Fuploads%2Fgit-blob-5a551ce760a6404c12ce0b64377b467323fa8595%2Fdiscord-invite-permissions.png?alt=media" alt="Discord&#x27;s permission list for the Member Counter invite"><figcaption><p>The eight permissions the invite link requests</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Permissions the bot requests

| Permission               | Required                           | Why the bot asks for it                                                                                                                                                              |
| ------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **View Channels**        | Yes                                | The bot can only edit a channel it can see. A channel it cannot see is skipped.                                                                                                      |
| **Manage Channels**      | Yes                                | This is what renames a channel or rewrites its topic. Every counter needs it.                                                                                                        |
| **Connect**              | Yes, for voice channels            | Without it the bot cannot act on a voice channel. Text, announcement and category counters do not need it.                                                                           |
| **Send Messages**        | No                                 | Not used by any counter today.                                                                                                                                                       |
| **Read Message History** | No                                 | Not used by any counter today.                                                                                                                                                       |
| **Embed Links**          | No                                 | Not used by any counter today.                                                                                                                                                       |
| **Manage Roles**         | Yes, if you run `/setup`           | [`/setup`](/commands/setup.md) creates its channels together with permission overwrites, and Discord refuses that unless the bot has **Manage Roles**. Without it the command fails. |
| **Ban Members**          | Yes, for the banned members option | The bot reads the server's ban list for the banned-members option of the [Members counter](/counters-reference/members.md).                                                          |

One failing counter fails the whole template, so if you uncheck **Ban Members** and later write a template that counts banned members, that channel is renamed to **ERROR!**

{% hint style="info" %}
**Manage Roles** is only used by `/setup` when it creates its channels with permission overwrites. The bot never creates, edits, assigns or deletes roles.
{% endhint %}

## Per-channel permissions

Authorizing grants those permissions server-wide, but a single channel can override them. If the bot loses **View Channel**, **Manage Channel** or **Connect** in one channel, that channel stops updating and nothing is posted in Discord to tell you. The dashboard is where you find out: open the channel and a warning tells you the bot cannot edit it, with a **Check again** button.

<figure><img src="https://1582170640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lu2S5r7lKtu4IK5ucu9%2Fuploads%2Fgit-blob-6781eee0901fc6175a20f34067bf8abdd06d952b%2Fsettings-channel-missing-permissions.png?alt=media" alt="The missing permissions warning"><figcaption><p>The permissions the bot needs on this specific channel</p></figcaption></figure>

Next: [Quick setup](/getting-started/quick-setup.md) or [Creating your first counter](/getting-started/create-from-scratch.md). See [Troubleshooting](/using-the-dashboard/troubleshooting.md) for the other failure modes.

<details>

<summary>Technical details</summary>

* The dashboard only offers to add the bot when your Discord permissions in that server include Administrator or Manage Guild. Outside a secure context the copy button is replaced by the plain link.
* The dashboard runs the same `botHasPermsToEdit` check as the bot (`packages/common/src/botHasPermsToEdit.ts`), and **Check again** refetches it.
* When the check fails during an update, the bot logs "The bot does not have sufficient permissions to edit the channel." against that channel and skips it. Nothing is sent to Discord, so the dashboard is the only place the error surfaces.
* `/setup` needs Manage Roles because it creates every channel with two overwrites: the bot member allowed Connect and View Channel, the `@everyone` role denied Connect.
* Gateway intents are not part of the invite and cannot be granted here. They are enabled in the Discord Developer Portal and computed from the instance flags.
* Self-hosting: `/invite` builds its link from `MAIN_DISCORD_CLIENT_ID`, which `.env.example` sets to the official bot's id `478567255198662656`, so a self-hosted bot invites the official bot until you change it. The command's second button uses `DISCORD_CLIENT_ID` (your own instance) and only appears when you have Manage Guild in the server where you ran it.

</details>
