Ignore Leave Message if the bot is the one leaving

This commit is contained in:
Dragon Fire
2020-04-09 14:40:10 -04:00
parent 2bf570f3d2
commit 522557dc4e
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -73,6 +73,7 @@ client.on('message', async msg => {
});
client.on('guildMemberRemove', async member => {
if (member.id === client.user.id) return null;
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;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "112.19.14",
"version": "112.19.15",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {