aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheEdgeNK <trey6979@gmail.com>2018-06-28 22:40:09 -0400
committerTheEdgeNK <trey6979@gmail.com>2018-06-28 22:40:09 -0400
commit89bb87236b5f19b920ca189a5c8220b1ae907d4b (patch)
tree926c06a3bd1a4c332348fb4336fd54f910240418
parent90f7db041e173b1410f945f5fe112eed13e3aec6 (diff)
downloadPokeBot-89bb87236b5f19b920ca189a5c8220b1ae907d4b.tar.gz
PokeBot-89bb87236b5f19b920ca189a5c8220b1ae907d4b.tar.bz2
PokeBot-89bb87236b5f19b920ca189a5c8220b1ae907d4b.zip
Added the start of alliances!
-rw-r--r--commands/Pokemon/joinalliance.js (renamed from commands/Pokemon/join.js)28
-rw-r--r--commands/Pokemon/leavealliance.js (renamed from commands/Pokemon/leave.js)10
-rw-r--r--events/guildMemberAdd.js2
3 files changed, 20 insertions, 20 deletions
diff --git a/commands/Pokemon/join.js b/commands/Pokemon/joinalliance.js
index 2187eef..33c84ba 100644
--- a/commands/Pokemon/join.js
+++ b/commands/Pokemon/joinalliance.js
@@ -11,23 +11,23 @@ exports.run = async (bot, msg, args) => {
const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id);
if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Only whitelisted servers can use this command. Sorry!');
- if (args.length < 1) return msg.reply('Please choose a team to join');
+ if (args.length < 1) return msg.reply('Please choose an alliance to join');
const team = findTeam(msg, args[0]);
switch (args[0])
{
- case 'skull': {
+ case 'Skull': {
msg.member.addRole(msg.guild.roles.find('name', 'Skull'));
- msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Skull.`);
+ msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined the alliance 'Skull'.`);
break;
}
- case 'flare' : {
- msg.member.addRole(msg.guild.roles.find('name', 'Flare'));
- msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined team Flare.`);
+ case 'DarkSide' : {
+ msg.member.addRole(msg.guild.roles.find('name', 'Dark Side'));
+ msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined the alliance 'Dark Side'.`);
break;
}
default : {
- msg.reply('You have to pick skull, or flare.');
+ msg.reply('You did not pick an existing alliance. The list of alliances are as follows:\nDarkSide, Skull');
break;
}
}
@@ -42,10 +42,10 @@ function findTeam(msg, team) {
msg.member.removeRole(msg.guild.roles.find('name', 'Skull'));
oldTeam = 'Skull';
}
- else if (msg.member.roles.find('name', 'Flare')) {
- if (team == 'flare') return;
- msg.member.removeRole(msg.guild.roles.find('name', 'Flare'));
- oldTeam = 'Flare';
+ else if (msg.member.roles.find('name', 'Dark Side')) {
+ if (team == 'DarkSide') return;
+ msg.member.removeRole(msg.guild.roles.find('name', 'DarkSide'));
+ oldTeam = 'DarkSide';
}
return oldTeam;
}
@@ -56,7 +56,7 @@ exports.conf = {
};
exports.help = {
- name: 'join',
- description: 'Join one of the teams!',
- usage: '<flare/skull>',
+ name: 'joinalliance',
+ description: 'Join one of the alliances!',
+ usage: '<alliance name>',
};
diff --git a/commands/Pokemon/leave.js b/commands/Pokemon/leavealliance.js
index 813debe..4d31286 100644
--- a/commands/Pokemon/leave.js
+++ b/commands/Pokemon/leavealliance.js
@@ -13,11 +13,11 @@ exports.run = async (bot, msg) => {
if (msg.member.roles.find('name', 'Skull')) {
msg.member.removeRole(msg.guild.roles.find('name', 'Skull'));
- msg.reply('Alright, you are not longer in team Skull.');
+ msg.reply('Alright, you are not longer in the alliance `Skull`.');
}
- else if (msg.member.roles.find('name', 'Flare')) {
- msg.member.removeRole(msg.guild.roles.find('name', 'Flare'));
- msg.reply('Alright, you are not longer in team Flare.');
+ else if (msg.member.roles.find('name', 'Dark Side')) {
+ msg.member.removeRole(msg.guild.roles.find('name', 'Dark Side'));
+ msg.reply('Alright, you are not longer in the alliance `Dark Side`.');
}
else {
msg.reply('You are not in a team.');
@@ -31,5 +31,5 @@ exports.conf = {
exports.help = {
name: 'leave',
- description: 'Leave the team you currently are in.',
+ description: 'Leave the alliance you currently are in.',
};
diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js
index c24ac57..9c901a8 100644
--- a/events/guildMemberAdd.js
+++ b/events/guildMemberAdd.js
@@ -36,7 +36,7 @@ module.exports = async (bot, member) => {
bot.channels.get('426829685289123850').setName('Member Count: ' + (member.guild.memberCount - botCount));
bot.channels.get('426829838238613504').setName('Bot Count: ' + botCount);
bot.channels.get('417100669980508160').send(`Welcome to the server **${member.user.tag}**! Make sure to read the rules! We now have ${member.guild.memberCount} members.`);
- bot.channels.get('417088992329334794').send('Welcome to the server <@' + member.id + '>. Be sure to join a team: `p:join <flare, skull>`. Also, make sure to read our introduction: `p:start`.');
+ bot.channels.get('417088992329334794').send('Welcome to the server <@' + member.id + '>. Be sure to join an alliance! To see current alliances, run the command `p:join`. Thanks for visiting, and we hope you enjoy your stay.');
const role = member.guild.roles.find('name', 'Trainers');
member.addRole(role);
};