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;
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "105.2.0",
"version": "105.2.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
@@ -38,7 +38,7 @@
"discord.js": "github:discordjs/discord.js",
"discord.js-commando": "github:discordjs/Commando",
"dotenv": "^8.0.0",
"mathjs": "^5.10.0",
"mathjs": "^5.10.3",
"moment": "^2.24.0",
"moment-duration-format": "^2.2.2",
"moment-timezone": "^0.5.25",