# Member Join and Leave Messages

### **Placeholders**

Before I start off, there are a few important placeholders that are supported by member join and leave messages. These replace with variables in order to introduce a more dynamic element to your join and leave messages. They are:

* \<USER> - A mention of the user who joined/left. (e.g. @yzfire)
* \<SERVERNAME> - The current name of the server.
* \<MEMBERCOUNT> - Replaces with the new member count of the server.
* \<MEMBERID> - The user ID of the member who joined/left.
* \<USERTAG> -  The Discord 'tag' (username#discriminator) of the user who joined/left.

### Managing the Join/Leave Message and Channel

**Join**

To start off, I will go over how to manage the join message. To set a new join message, type `;membjoinleave join message <message>`, replacing \<message> with whatever you want yzbot to send when a new member joins.

![You can put placeholders in this message and they will replace dynamically.](https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4O8-z0QathqkCElQ37%2Fimage.png?alt=media\&token=cc83a7df-7a9a-4549-a643-760e3b9abbc2)

Now, you need to set which channel you want yzbot to send the join message to. I'm just going to use `#general` here. So what you want to do now, is type `;membjoinleave join channel <#channel>`, replacing <#channel> with the channel mention of where you want to send the join message to.

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4O8YhUn6NzI8_P9vpn%2Fimage.png?alt=media&#x26;token=57bb98bb-f3a2-46c6-8120-80985be00070" alt=""></div>

Your join message has now been set up and will send whenever a new member joins the server. If you ever want to stop yzbot sending a message when a new member joins, type `;membjoinleave join remove` and it will delete the message and channel settings that you had set before.

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4O8zhqtDFN3JmbsMiN%2Fimage.png?alt=media&#x26;token=e71ba3f9-d9b1-4c85-9556-cdaa63c71693" alt=""></div>

**Leave**

Now I will show you how to get yzbot to send a message whenever a user leaves your server. Firstly, we need to type `;membjoinleave leave message <message>`, replacing \<message> with whatever you want to be sent when someone leaves the server.

![](https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4OFO3jXNcnbrVr1Gox%2Fimage.png?alt=media\&token=be1a71c5-bc49-4817-91d3-797f52b80678)

To set the channel, type `;membjoinleave leave channel <#channel>`, replacing <#channel> with where you want to send leave messages.

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4OFgoBUCUADp_cD7Bu%2Fimage.png?alt=media&#x26;token=64245843-c104-4ba5-98c5-317356643e91" alt=""></div>

To remove the setting for leave messages, simply type `;membjoinleave leave remove`.

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4OFrO2rqJg2AEE1214%2Fimage.png?alt=media&#x26;token=c2ef8994-6392-412c-b2a2-552c19080a5a" alt=""></div>
