mirror of
https://github.com/UniverseDevGroup/PokeBot.git
synced 2025-01-23 01:42:01 -05:00
Cange
This commit is contained in:
parent
a4d1af8d48
commit
3e223e6e0f
2 changed files with 32 additions and 32 deletions
|
@ -4,23 +4,23 @@ exports.run = async (bot, msg, args) => {
|
||||||
const team = findTeam(msg, args[0]);
|
const team = findTeam(msg, args[0]);
|
||||||
switch(args[0])
|
switch(args[0])
|
||||||
{
|
{
|
||||||
case 'mystic': {
|
case 'aqua': {
|
||||||
msg.member.addRole(msg.guild.roles.find('name', 'Mystic'));
|
msg.member.addRole(msg.guild.roles.find('name', 'Aqua'));
|
||||||
msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Mystic.`);
|
msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Aqua.`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'valor' : {
|
case 'rocket' : {
|
||||||
msg.member.addRole(msg.guild.roles.find('name', 'Valor'));
|
msg.member.addRole(msg.guild.roles.find('name', 'Rocket'));
|
||||||
msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Valor.`);
|
msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Rocket.`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'instinct' : {
|
case 'magma' : {
|
||||||
msg.member.addRole(msg.guild.roles.find('name', 'Instinct'));
|
msg.member.addRole(msg.guild.roles.find('name', 'Magma'));
|
||||||
msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Instinct.`);
|
msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Magma.`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default : {
|
default : {
|
||||||
msg.reply('You have to pick, mystic, valor, or instinct.');
|
msg.reply('You have to pick, aqua, rocket, or magma.');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,20 +30,20 @@ function findTeam(msg, team) {
|
||||||
|
|
||||||
let oldTeam;
|
let oldTeam;
|
||||||
|
|
||||||
if (msg.member.roles.find('name', 'Mystic')) {
|
if (msg.member.roles.find('name', 'Aqua')) {
|
||||||
if (team == 'mystic') return;
|
if (team == 'aqua') return;
|
||||||
msg.member.removeRole(msg.guild.roles.find('name', 'Mystic'));
|
msg.member.removeRole(msg.guild.roles.find('name', 'Aqua'));
|
||||||
oldTeam = 'Mystic';
|
oldTeam = 'Aqua';
|
||||||
}
|
}
|
||||||
else if (msg.member.roles.find('name', 'Valor')) {
|
else if (msg.member.roles.find('name', 'Rocket')) {
|
||||||
if (team == 'valor') return;
|
if (team == 'rocket') return;
|
||||||
msg.member.removeRole(msg.guild.roles.find('name', 'Valor'));
|
msg.member.removeRole(msg.guild.roles.find('name', 'Rocket'));
|
||||||
oldTeam = 'Valor';
|
oldTeam = 'Rocket';
|
||||||
}
|
}
|
||||||
else if (msg.member.roles.find('name', 'Instinct')) {
|
else if (msg.member.roles.find('name', 'Magma')) {
|
||||||
if (team == 'instinct') return;
|
if (team == 'magma') return;
|
||||||
msg.member.removeRole(msg.guild.roles.find('name', 'Instinct'));
|
msg.member.removeRole(msg.guild.roles.find('name', 'Magma'));
|
||||||
oldTeam = 'Instinct';
|
oldTeam = 'Magma';
|
||||||
}
|
}
|
||||||
return oldTeam;
|
return oldTeam;
|
||||||
}
|
}
|
||||||
|
@ -56,5 +56,5 @@ exports.conf = {
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: 'join',
|
name: 'join',
|
||||||
description: 'Join one of the teams!',
|
description: 'Join one of the teams!',
|
||||||
usage: '<mystic/valor/instinct>',
|
usage: '<aqua/rocket/magma>',
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
exports.run = async (bot, msg) => {
|
exports.run = async (bot, msg) => {
|
||||||
if (msg.member.roles.find('name', 'Mystic')) {
|
if (msg.member.roles.find('name', 'Aqua')) {
|
||||||
msg.member.removeRole(msg.guild.roles.find('name', 'Mystic'));
|
msg.member.removeRole(msg.guild.roles.find('name', 'Aqua'));
|
||||||
msg.reply('Alright, you are not longer in team Mystic.');
|
msg.reply('Alright, you are not longer in team Aqua.');
|
||||||
}
|
}
|
||||||
else if (msg.member.roles.find('name', 'Valor')) {
|
else if (msg.member.roles.find('name', 'Rocket')) {
|
||||||
msg.member.removeRole(msg.guild.roles.find('name', 'Valor'));
|
msg.member.removeRole(msg.guild.roles.find('name', 'Rocket'));
|
||||||
msg.reply('Alright, you are not longer in team Valor.');
|
msg.reply('Alright, you are not longer in team Rocket.');
|
||||||
}
|
}
|
||||||
else if (msg.member.roles.find('name', 'Instinct')) {
|
else if (msg.member.roles.find('name', 'Magma')) {
|
||||||
msg.member.removeRole(msg.guild.roles.find('name', 'Instinct'));
|
msg.member.removeRole(msg.guild.roles.find('name', 'Magma'));
|
||||||
msg.reply('Alright, you are not longer in team Instinct.');
|
msg.reply('Alright, you are not longer in team Magma.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
msg.reply('You are not in a team.');
|
msg.reply('You are not in a team.');
|
||||||
|
|
Loading…
Reference in a new issue