mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 15:57:54 +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;
|
||||
|
||||
Reference in New Issue
Block a user