mirror of
https://github.com/UniverseDevGroup/PokeBot.git
synced 2025-01-23 09:51:58 -05:00
Merge branch 'master' of https://github.com/PokeWorld/PokeBot
This commit is contained in:
commit
7d51de6816
1 changed files with 10 additions and 7 deletions
|
@ -1,32 +1,35 @@
|
|||
exports.run = async (bot, msg, args) => {
|
||||
if (args.length < 1) return msg.reply('Please choose a team to join');
|
||||
|
||||
let team;
|
||||
|
||||
if (msg.member.roles.find('name', 'Mystic')) {
|
||||
msg.member.removeRole(msg.guild.roles.find('name', 'Mystic'));
|
||||
msg.reply('You have left team Mystic.');
|
||||
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.');
|
||||
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.');
|
||||
team = 'Instinct';
|
||||
}
|
||||
switch(args[0])
|
||||
{
|
||||
case 'mystic': {
|
||||
msg.member.addRole(msg.guild.roles.find('name', 'Mystic'));
|
||||
msg.reply('Alright, you are have joined team Mystic.');
|
||||
msg.reply(`Alright, ${team ? 'you have left team ' + team + 'and ' : 'you are have '}joined team Mystic.`);
|
||||
break;
|
||||
}
|
||||
case 'valor' : {
|
||||
msg.member.addRole(msg.guild.roles.find('name', 'Valor'));
|
||||
msg.reply('Alright, you have joined team Valor.');
|
||||
msg.reply(`Alright, ${team ? 'you have left team ' + team + 'and ' : 'you are have '}joined team Valor.`);
|
||||
break;
|
||||
}
|
||||
case 'instinct' : {
|
||||
msg.member.addRole(msg.guild.roles.find('name', 'Instinct'));
|
||||
msg.reply('Alright, you have joined team Instinct.');
|
||||
msg.reply(`Alright, ${team ? 'you have left team ' + team + 'and ' : 'you are have '}joined team Instinct.`);
|
||||
break;
|
||||
}
|
||||
default : {
|
||||
|
@ -37,7 +40,7 @@ exports.run = async (bot, msg, args) => {
|
|||
};
|
||||
|
||||
exports.conf = {
|
||||
aliases: [],
|
||||
aliases: ['pick'],
|
||||
guildOnly: true,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue