aboutsummaryrefslogtreecommitdiff
path: root/commands/join.js
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-02-24 12:52:55 -0500
committerUnknown <jtsshieh@outlook.com>2018-02-24 12:52:55 -0500
commit99252aef92aeb9157f597dd66bcc368dbe706a7d (patch)
tree7aed4f60e299d896ac1d9240acf810d0a8189240 /commands/join.js
parentfc525dece7d6901063285454399b1ba4c647666e (diff)
downloadPokeBot-99252aef92aeb9157f597dd66bcc368dbe706a7d.tar.gz
PokeBot-99252aef92aeb9157f597dd66bcc368dbe706a7d.tar.bz2
PokeBot-99252aef92aeb9157f597dd66bcc368dbe706a7d.zip
fix join
Diffstat (limited to 'commands/join.js')
-rw-r--r--commands/join.js12
1 files changed, 12 insertions, 0 deletions
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': {