Allow users to turn off leave messages.

This commit is contained in:
Dragon Fire
2019-05-30 21:32:53 -04:00
parent 8f21bcc9a9
commit 3ff8bbd6c5
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -50,6 +50,7 @@ client.on('ready', () => {
client.on('guildMemberRemove', async member => {
const channel = member.guild.systemChannel;
if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return null;
if (channel.topic && channel.topic.includes('<xiao:disable-leave>')) return null;
try {
await channel.send(`**${member.user.tag}** bailed on us...`);
return null;