Factions can be joined when all necessary bots and the server are running

This commit is contained in:
2018-10-29 06:04:14 +11:00
parent 09901ca10f
commit b4e42e4d76
9 changed files with 109 additions and 10 deletions

View File

@@ -77,11 +77,6 @@ exports.ChangeFaction = function(client, factionRole, channel, member, fn) {
member = guild.members.get(user.id);
}
if (member.roles.has(factionRole)) {
//can't change to this faction
fn("alreadyJoined");
}
let handleResponse = async function(response) {
if (response === "conversionLocked") { //can't change too fast
fn(response);
@@ -97,5 +92,5 @@ exports.ChangeFaction = function(client, factionRole, channel, member, fn) {
fn(response);
};
dataRequest.OnServerData("conversion", handleResponse, member.user.id);
dataRequest.OnServerData("conversion", handleResponse, member.user.id, factionRole);
}