> For the complete documentation index, see [llms.txt](https://docs.botwiz.dev/botwiz-guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.botwiz.dev/botwiz-guides/botwiz-guides-1/server-statistics/member-count.md).

# Member Count

The subpage to teach you how to set up display how many members your guild has!

### Setting up the Voice Channel

In your server, create a voice channel, name this as you wish and change the channel permission so no one can join the voice channel.

{% hint style="warning" %}
Anyone with the `ADMINISTRATOR` permission can join / view any channel within your server.
{% endhint %}

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2FN79voew8wJAljR0YHKqI%2Fimage.png?alt=media&amp;token=e3ad06b3-02f1-4a43-9a7c-238471c41751" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Member Joins" %}

### Initialising the Event

Create a Discord Event with the name '**When a member joins a guild**', you can nickname this event anything you wish. For this guide we will nickname it 'Join - Member count'

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2F3YN0U42hmvmXVBIZToz0%2FCreate.png?alt=media&amp;token=5e6529b9-c0f3-44fd-a02c-16c1d052a738" alt=""><figcaption><p>Image shows the Discord Event filled in correctly.</p></figcaption></figure>

### Editing the Voice Channel

Connect a 'Edit channel' block to your event tree and follow the structure below:

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2Fc8BQh5smYrVM8RRR8oEN%2Fimage.png?alt=media&amp;token=f511e406-2e6e-452b-a671-87a3a9c371fc" alt=""><figcaption><p>Image shows what the event will look like.</p></figcaption></figure>

#### Channel Type

Channel ID / Variable

#### Channel ID

This is the channel ID of your voice channel.

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2F6LcKPAUA4R9M8kDd01vo%2Fimage.png?alt=media&amp;token=e29d0a88-85ad-428e-a3fe-bf14fa0cc160" alt=""><figcaption></figcaption></figure>

#### Channel Name

**Member count: {interaction\[guild.memberCount]}**

#### Category (Optional)

The category you would like to put the voice channel under.

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2F1SU82o45gc0WGt6NwbYH%2Fimage.png?alt=media&amp;token=21fb722a-ea1d-4a13-9ce7-519c7f75b95e" alt=""><figcaption></figcaption></figure>

#### Channel Topic (Optional)

The topic for your channel - For this guide we wont have a channel topic.

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2FD5ECjNunsGHVALXIT0RD%2Fimage.png?alt=media&amp;token=b2d7cca0-4d86-4e62-89c4-db7f84e9ad6b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
All of the fields show in the image above are optional, and we wont need them for this guide.
{% endhint %}

{% hint style="success" %}
Save your event and your statistics channel will now update when a user joins!
{% endhint %}

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2FHR1loXK0BMRsSmFPWUoJ%2Fjoin.gif?alt=media&amp;token=eef359bd-8114-4af2-b744-58d57eae65c7" alt=""><figcaption><p>Video shows what happens when a user joins the guild.</p></figcaption></figure>
{% endtab %}

{% tab title="Member leaves" %}

### Initialising the Event

Create a Discord Event with the name '**When a member leaves a guild or is kicked**', you can nickname this event anything you wish. For this guide we will nickname it 'Leave - Member update'

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2Fjg9eKoB50c28GwPEdCf2%2Fimage.png?alt=media&amp;token=3adf4d87-cfe6-4e9a-9c40-b14fca376a5b" alt=""><figcaption></figcaption></figure>

### Editing the Voice Channel

Connect a 'Edit channel' block to your event tree and follow the structure below:

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2F3OQ84EYgTaAviOfa86pK%2Fimage.png?alt=media&amp;token=d2448e54-5ea1-4457-b05d-5763b345607b" alt=""><figcaption></figcaption></figure>

#### Channel Type

Channel ID / Variable

#### Channel ID

This is the channel ID of your voice channel.

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2F6LcKPAUA4R9M8kDd01vo%2Fimage.png?alt=media&amp;token=e29d0a88-85ad-428e-a3fe-bf14fa0cc160" alt=""><figcaption></figcaption></figure>

#### Channel Name

**Member count: {interaction\[guild.memberCount]}**

#### Category (Optional)

The category you would like to put the voice channel under.

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2F1SU82o45gc0WGt6NwbYH%2Fimage.png?alt=media&amp;token=21fb722a-ea1d-4a13-9ce7-519c7f75b95e" alt=""><figcaption></figcaption></figure>

#### Channel Topic (Optional)

The topic for your channel - For this guide we wont have a channel topic.

<figure><img src="https://3071155663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kWzjw3glf7IkiBD8sfd%2Fuploads%2FD5ECjNunsGHVALXIT0RD%2Fimage.png?alt=media&amp;token=b2d7cca0-4d86-4e62-89c4-db7f84e9ad6b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
All of the fields show in the image above are optional, and we wont need them for this guide.
{% endhint %}
{% endtab %}
{% endtabs %}

Once you have added either or both events to your bot you can can see the voice channel will update when a member joins & leaves your server!

{% hint style="success" %}
That is the event officially setup, if you have any other questions related to botwiz or about this guide feel free to visit our [Support Server](https://discord.gg/5qRpsctzjB)!
{% endhint %}
