mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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 => {
|
client.on('guildMemberRemove', async member => {
|
||||||
const channel = member.guild.systemChannel;
|
const channel = member.guild.systemChannel;
|
||||||
if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return null;
|
if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return null;
|
||||||
|
if (channel.topic && channel.topic.includes('<xiao:disable-leave>')) return null;
|
||||||
try {
|
try {
|
||||||
await channel.send(`**${member.user.tag}** bailed on us...`);
|
await channel.send(`**${member.user.tag}** bailed on us...`);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "105.2.0",
|
"version": "105.2.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"discord.js": "github:discordjs/discord.js",
|
"discord.js": "github:discordjs/discord.js",
|
||||||
"discord.js-commando": "github:discordjs/Commando",
|
"discord.js-commando": "github:discordjs/Commando",
|
||||||
"dotenv": "^8.0.0",
|
"dotenv": "^8.0.0",
|
||||||
"mathjs": "^5.10.0",
|
"mathjs": "^5.10.3",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"moment-duration-format": "^2.2.2",
|
"moment-duration-format": "^2.2.2",
|
||||||
"moment-timezone": "^0.5.25",
|
"moment-timezone": "^0.5.25",
|
||||||
|
|||||||
Reference in New Issue
Block a user