Configuring messages to be sent when a user is banned
Ever needed to see who banned a user, or the audit log reason for which they were banned? Yzbot can do that! Before continuing, make sure yzbot has the View Audit Log permission in your server.
Ban Messages
So, what do I mean by a ban message? In terms of yzbot, this means a message that is sent to a channel when a user is banned from your server, in any way. I do not mean a message that is sent when you use the ;ban command. These ban messages offer a number of useful placeholders like welcome and leave messages. Once you've typed out the two commands that you have to use to configure yzbot to do this, you will be able to use this powerful feature in yzbot. By the way, you need to be the server owner, someone with the Administrator permission, or someone with the Manage Server permission in order to use these commands.
The Commands
;banmessage message <Your ban message here>
;banmessage channel <Your channel here>
What do these commands do? Well, you'd be correct to guess that these are the two commands that I referred to earlier to configure yzbot to send ban messages.
Placeholders
Before you see the example, here are all of the placeholders that you can use for ban messages.
<REASON> - Replaces with the Audit Log reason for the ban.
<EXECUTOR> - Replaces with the user mention of the person who performed the ban. (e.g. @yzfire)
<EXECUTORTAG> - Replaces with the user tag of the person who performed the ban (e.g. yzfire#6822)
<EXECUTORID> - Replaces with the user ID of the person who performed the ban. (e.g. 267670678050832384)
<BANNEDUSER> - Replaces with the user mention of the person who got banned.
<BANNEDUSERTAG> - Replaces with the user tag of the person who got banned.
<BANNEDUSERID> - Replaces with the user ID of the person who got banned.
Example
Ok, time to get into the fun stuff. We're going to configure a ban message and then ban a user and see the result. Firstly, we'll configure the ban message, with these two commands.
;banmessage message <EXECUTOR> has just banned <BANNEDUSER> (<BANNEDUSERID>).
The reason for their banning, courtesy of the Audit Logs, is: <REASON>.
;banmessage channel #general
An output like this should be produced when you do this:

Voila. Yzbot's ban message feature is now fully configured. Let's ban a user. Funnily enough, I'm going to ban yzbot here.

The second message of yzbot's there is the ban message we configured. A fully configured ban message courtesy of yzbot. I hope you enjoy this feature.
Removing the message
If you want to remove the ban message at a later point, just type this command and it will remove the message and channel settings that you had set previously.
;banmessage remove
Last updated