mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Allow users to turn off leave messages.
This commit is contained in:
@@ -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
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user