From 99252aef92aeb9157f597dd66bcc368dbe706a7d Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 24 Feb 2018 12:52:55 -0500 Subject: fix join --- commands/join.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/commands/join.js b/commands/join.js index 22d2759..2e431b0 100644 --- a/commands/join.js +++ b/commands/join.js @@ -1,5 +1,17 @@ exports.run = async (bot, msg, args) => { if (args.length < 1) return msg.reply('Please choose a team to join'); + if (msg.member.roles.find('name', 'Mystic')) { + msg.member.removeRole(msg.guild.roles.find('name', 'Mystic')); + msg.reply('You have left team Mystic.'); + } + else if (msg.member.roles.find('name', 'Valor')) { + msg.member.removeRole(msg.guild.roles.find('name', 'Valor')); + msg.reply('You have left team Valor.'); + } + else if (msg.member.roles.find('name', 'Instinct')) { + msg.member.removeRole(msg.guild.roles.find('name', 'Instinct')); + msg.reply('You have left team Instinct.'); + } switch(args[0]) { case 'mystic': { -- cgit v1.2.3