From b85784706ee4ecf10200a71b1e82a028081f36dd Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 7 Mar 2020 18:07:42 +0100 Subject: [PATCH] remove role thing --- event/listeners/guildMemberAdd.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/event/listeners/guildMemberAdd.js b/event/listeners/guildMemberAdd.js index 8c04bbcd..23ae19c6 100644 --- a/event/listeners/guildMemberAdd.js +++ b/event/listeners/guildMemberAdd.js @@ -49,23 +49,6 @@ class guildMemberAddListener extends Listener { } welcomeMessage = welcomeMessage.replace(/(\[attach:.*?])/, ''); } - - // Give a role - let role; - if (welcomeMessage.includes('[role:')) { - role = welcomeMessage.split(/(\[role:.*?])/); - for (let i = 0, l = role.length; i < l; i++) { - if (role[i].includes('[role:')) { - role = role[i].replace('[role:', '').slice(0, -1); - i = role.length; - } - } - - const rank = member.guild.roles.cache.find(rank => rank.name === role); - member.roles.add(rank); - - welcomeMessage = welcomeMessage.replace(/(\[role:.*?])/, ''); - } welcomeMessage = rand.random(welcomeMessage);