aboutsummaryrefslogtreecommitdiff
path: root/commands/Teams
diff options
context:
space:
mode:
Diffstat (limited to 'commands/Teams')
-rw-r--r--commands/Teams/join.js60
-rw-r--r--commands/Teams/leave.js27
2 files changed, 0 insertions, 87 deletions
diff --git a/commands/Teams/join.js b/commands/Teams/join.js
deleted file mode 100644
index 39bdf90..0000000
--- a/commands/Teams/join.js
+++ /dev/null
@@ -1,60 +0,0 @@
-exports.run = async (bot, msg, args) => {
- if (args.length < 1) return msg.reply('Please choose a team to join');
-
- const team = findTeam(msg, args[0]);
- switch(args[0])
- {
- case 'aqua': {
- msg.member.addRole(msg.guild.roles.find('name', 'Aqua'));
- msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Aqua.`);
- break;
- }
- case 'rocket' : {
- msg.member.addRole(msg.guild.roles.find('name', 'Rocket'));
- msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Rocket.`);
- break;
- }
- case 'magma' : {
- msg.member.addRole(msg.guild.roles.find('name', 'Magma'));
- msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Magma.`);
- break;
- }
- default : {
- msg.reply('You have to pick, aqua, rocket, or magma.');
- break;
- }
- }
-};
-
-function findTeam(msg, team) {
-
- let oldTeam;
-
- if (msg.member.roles.find('name', 'Aqua')) {
- if (team == 'aqua') return;
- msg.member.removeRole(msg.guild.roles.find('name', 'Aqua'));
- oldTeam = 'Aqua';
- }
- else if (msg.member.roles.find('name', 'Rocket')) {
- if (team == 'rocket') return;
- msg.member.removeRole(msg.guild.roles.find('name', 'Rocket'));
- oldTeam = 'Rocket';
- }
- else if (msg.member.roles.find('name', 'Magma')) {
- if (team == 'magma') return;
- msg.member.removeRole(msg.guild.roles.find('name', 'Magma'));
- oldTeam = 'Magma';
- }
- return oldTeam;
-}
-
-exports.conf = {
- aliases: ['pick', 'choose'],
- guildOnly: true,
-};
-
-exports.help = {
- name: 'join',
- description: 'Join one of the teams!',
- usage: '<aqua/rocket/magma>',
-};
diff --git a/commands/Teams/leave.js b/commands/Teams/leave.js
deleted file mode 100644
index fb02e16..0000000
--- a/commands/Teams/leave.js
+++ /dev/null
@@ -1,27 +0,0 @@
-exports.run = async (bot, msg) => {
- if (msg.member.roles.find('name', 'Aqua')) {
- msg.member.removeRole(msg.guild.roles.find('name', 'Aqua'));
- msg.reply('Alright, you are not longer in team Aqua.');
- }
- else if (msg.member.roles.find('name', 'Rocket')) {
- msg.member.removeRole(msg.guild.roles.find('name', 'Rocket'));
- msg.reply('Alright, you are not longer in team Rocket.');
- }
- else if (msg.member.roles.find('name', 'Magma')) {
- msg.member.removeRole(msg.guild.roles.find('name', 'Magma'));
- msg.reply('Alright, you are not longer in team Magma.');
- }
- else {
- msg.reply('You are not in a team.');
- }
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: true,
-};
-
-exports.help = {
- name: 'leave',
- description: 'Leave the team you currently are in.',
-};