diff --git a/Xiao.js b/Xiao.js index 248a5361..b640019d 100644 --- a/Xiao.js +++ b/Xiao.js @@ -10,6 +10,7 @@ const client = new Client({ disabledEvents: ['TYPING_START'] }); const activities = require('./assets/json/activity'); +const leaveMsgs = require('./assets/json/leave-messages'); client.registry .registerDefaultTypes() @@ -52,7 +53,8 @@ client.on('guildMemberRemove', async member => { if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return null; if (channel.topic && channel.topic.includes('')) return null; try { - await channel.send(`**${member.user.tag}** bailed on us...`); + const leaveMsg = leaveMsgs[Math.floor(Math.random() * leaveMsgs.length)]; + await channel.send(leaveMsg.replace(/{{user}}/gi, `**${member.user.tag}**`)); return null; } catch (err) { return null; diff --git a/assets/json/leave-messages.json b/assets/json/leave-messages.json new file mode 100644 index 00000000..9db6058c --- /dev/null +++ b/assets/json/leave-messages.json @@ -0,0 +1,22 @@ +[ + "{{user}} bailed on us...", + "\"Look, what's that!\" said {{user}}, before dashing away.", + "{{user}} ran away.", + "{{user}} decided they didn't want to deal with you anymore and ran off.", + "{{user}} jumped ship.", + "{{user}} ate too much candy and was taken to a hospital in another server.", + "{{user}} left to join a rival gang.", + "{{user}} decided to take a break from your server. Possibly forever.", + "{{user}} said \"See ya, suckers!\"", + "According to all known laws of aviation, there is no way {{user}} should be able to fly. But they did, right out of your server.", + "Goodbye, {{user}}!", + "You forgot to feed {{user}}, so they ran away.", + "{{user}} left to become a hermit in the mountains. I hear he has a goat now.", + "{{user}} flew away. Wait, they have wings?!", + "We'll miss you, {{user}}! I think.", + "{{user}} left the nest. They grow up so fast...", + "{{user}} is no longer a part of your family.", + "And just like that, {{user}} said goodbye to your server and started a new adventure.", + "In other news, local resident {{user}} leaves the server. Cites stupid bot \"Xiao\" as the reason. Wait, stupid?", + "{{user}} left. How unfortunate." +] diff --git a/package.json b/package.json index b3f1fa3c..ea821432 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "105.3.1", + "version": "105.3.2", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {