Switched the order of the X mark in error messages

This commit is contained in:
2018-10-22 11:20:00 +11:00
parent fea606a8ac
commit acf8667965
2 changed files with 19 additions and 18 deletions

View File

@@ -105,6 +105,7 @@ client.on('message', async message => {
return; return;
} }
//TODO: remove this from ADAM
if (processGameplayCommands(message)) { if (processGameplayCommands(message)) {
return; return;
} }
@@ -185,7 +186,7 @@ function processGameplayCommands(message) {
shared.SendPublicMessage(client, message.author, message.channel, dialog("checkin", checkinAmount)); shared.SendPublicMessage(client, message.author, message.channel, dialog("checkin", checkinAmount));
shared.AddXP(client, message.author, 1); //1XP shared.AddXP(client, message.author, 1); //1XP
} else { } else {
shared.SendPublicMessage(client, message.author, message.channel, dialog("checkinLocked", checkInResponse)); shared.SendPublicMessage(client, message.channel, dialog("checkinLocked", message.author.id, checkInResponse));
} }
return true; return true;
@@ -194,13 +195,13 @@ function processGameplayCommands(message) {
//not enough //not enough
if (amount <= 0) { if (amount <= 0) {
shared.SendPublicMessage(client, message.author, message.channel, dialog("giveNotAboveZero")); shared.SendPublicMessage(client, message.channel, dialog("giveNotAboveZero", message.author.id));
return true; return true;
} }
//didn't mention anyone //didn't mention anyone
if (message.mentions.members.size == 0) { if (message.mentions.members.size == 0) {
shared.SendPublicMessage(client, message.author, message.channel, dialog("giveInvalidUser")); shared.SendPublicMessage(client, message.channel, dialog("giveInvalidUser", message.author.id));
return true; return true;
} }
@@ -208,7 +209,7 @@ function processGameplayCommands(message) {
//can't give to yourself //can't give to yourself
if (targetMember.id === message.author.id) { if (targetMember.id === message.author.id) {
shared.SendPublicMessage(client, message.author, message.channel, dialog("giveInvalidUserSelf")); shared.SendPublicMessage(client, message.channel, dialog("giveInvalidUserSelf", message.author.id));
return true; return true;
} }
@@ -216,13 +217,13 @@ function processGameplayCommands(message) {
//not enough money in account //not enough money in account
if (accountBalance < amount) { if (accountBalance < amount) {
shared.SendPublicMessage(client, message.author, message.channel, dialog("giveNotEnoughInAccount")); shared.SendPublicMessage(client, message.channel, dialog("giveNotEnoughInAccount", message.author.id));
return true; return true;
} }
//try to send the money //try to send the money
if (dataRequest.sendServerData("transfer", targetMember.id, message.author.id, amount) != "success") { if (dataRequest.sendServerData("transfer", targetMember.id, message.author.id, amount) != "success") {
shared.SendPublicMessage(client, message.author, message.channel, dialog("giveFailed")); shared.SendPublicMessage(client, message.channel, dialog("giveFailed", message.author.id));
return true; return true;
} }
@@ -299,10 +300,10 @@ function processFactionChangeAttempt(client, message, factionRole, factionShorth
.then(result => { .then(result => {
switch (result) { switch (result) {
case "alreadyJoined": case "alreadyJoined":
shared.SendPublicMessage(client, message.author, message.channel, dialog("alreadyJoined" + factionShorthand)); shared.SendPublicMessage(client, message.channel, dialog("alreadyJoined" + factionShorthand, message.author.id));
break; break;
case "hasConvertedToday": case "hasConvertedToday":
shared.SendPublicMessage(client, message.author, message.channel, dialog("conversionLocked")); shared.SendPublicMessage(client, message.channel, dialog("conversionLocked", message.author.id));
break; break;
case "createdUser": case "createdUser":
shared.SendPublicMessage(client, message.author, message.channel, dialog("newUserPublicMessage", shared.GetFactionName(factionRole), "TODO: factionChannel")); shared.SendPublicMessage(client, message.author, message.channel, dialog("newUserPublicMessage", shared.GetFactionName(factionRole), "TODO: factionChannel"));

View File

@@ -17,18 +17,18 @@
"helpRavager": "*The Ravagers have been hunting us since crashing here on New Eden. They roam this planet and will attack travelers on sight. But you can defend yourself:*\n\n!attack\n```Sends your weapon towards an active Ravager. If you win the fight, you can loot their corpse for crystals. But be careful: they bite back.```\n!details\n```Shows you the details of the last Ravager fight to take place as well as the crystal distribution.```", "helpRavager": "*The Ravagers have been hunting us since crashing here on New Eden. They roam this planet and will attack travelers on sight. But you can defend yourself:*\n\n!attack\n```Sends your weapon towards an active Ravager. If you win the fight, you can loot their corpse for crystals. But be careful: they bite back.```\n!details\n```Shows you the details of the last Ravager fight to take place as well as the crystal distribution.```",
"checkin": "Your presence has been noted. I've added {1} crystals to your account.", "checkin": "Your presence has been noted. I've added {1} crystals to your account.",
"checkinLocked": ":x: You already checked in with me {1}. You can check in again tomorrow.", "checkinLocked": ":x: <@{1}> You already checked in with me {2}. You can check in again tomorrow.",
"conversionLocked": ":x: As anxious as you may be, please don't attempt to change factions so quickly. You can only change once every 30 days.", "conversionLocked": ":x: <@{1}> As anxious as you may be, please don't attempt to change factions so quickly. You can only change once every 30 days.",
"depositSuccessful": "<@{1}> your deposit of {2} crystals has been successful. Good luck.", "depositSuccessful": "<@{1}> your deposit of {2} crystals has been successful. Good luck.",
"depositFailed": ":x: <@{1}> I can't make the deposit at the moment. I apologize for the inconvenience.", "depositFailed": ":x: <@{1}> I can't make the deposit at the moment. I apologize for the inconvenience.",
"giveSuccessful": "I've transferred {2} crystals to <@{1}> as per your request.", "giveSuccessful": "I've transferred {2} crystals to <@{1}> as per your request.",
"giveFailed": ":x: I can't make that transfer at the moment. I apologize for the inconvenience.", "giveFailed": ":x: <@{1}> I can't make that transfer at the moment. I apologize for the inconvenience.",
"giveNotEnoughInAccount": ":x: You don't have that many crystals in your account. As such, I can't complete the transfer.", "giveNotEnoughInAccount": ":x: <@{1}> You don't have that many crystals in your account. As such, I can't complete the transfer.",
"giveNotAboveZero": ":x: In order for me to complete the transfer I need an amount above zero.", "giveNotAboveZero": ":x: <@{1}> In order for me to complete the transfer I need an amount above zero.",
"giveInvalidUser": ":x: I can't find that traveler. Sorry.", "giveInvalidUser": ":x: <@{1}> I can't find that traveler. Sorry.",
"giveInvalidUserSelf": ":x: You can't send crystals to yourself. Sorry.", "giveInvalidUserSelf": ":x: <@{1}> You can't send crystals to yourself. Sorry.",
"LevelUp": "You just hit **level {2}**!{1} I've added a :cannister: **Nanotech Cannister** to your inventory so that you can upgrade your skills. You now have **{3}** total (you can check this any time with !stats).", "LevelUp": "You just hit **level {2}**!{1} I've added a :cannister: **Nanotech Cannister** to your inventory so that you can upgrade your skills. You now have **{3}** total (you can check this any time with !stats).",
"levelUpRemark": [ "levelUpRemark": [
@@ -56,13 +56,13 @@
"victors": "Currently, {1} controls the fate of the codex.", "victors": "Currently, {1} controls the fate of the codex.",
"noVictors": "The fate of the codex is still undetermined.", "noVictors": "The fate of the codex is still undetermined.",
"alreadyJoinedObsidian": ":x: You are already employed by Obsidian Technologies. There's no need to request a change.", "alreadyJoinedObsidian": ":x: <@{1}> You are already employed by Obsidian Technologies. There's no need to request a change.",
"joinObsidian": "You are now employed by Obsidian Technologies.", "joinObsidian": "You are now employed by Obsidian Technologies.",
"alreadyJoinedGenesis": ":x: You are already serving Genesis Command. There's no need to request a change.", "alreadyJoinedGenesis": ":x: <@{1}> You are already serving Genesis Command. There's no need to request a change.",
"joinGenesis": "You have joined the Genesis Command. Finally, some order can be enacted in this chaos.", "joinGenesis": "You have joined the Genesis Command. Finally, some order can be enacted in this chaos.",
"alreadyJoinedHand": ":x: The Hand is happy to have you in their congregation already. There's no need to request a change.", "alreadyJoinedHand": ":x: <@{1}> The Hand is happy to have you in their congregation already. There's no need to request a change.",
"joinHand": "You may now spread the word of the Hand. May the gods look favourably upon you.", "joinHand": "You may now spread the word of the Hand. May the gods look favourably upon you.",
"newUserPublicMessage": "Welcome to {1}. If you need me for anything, you can contact me via this secure channel. Just use **!help** for a list of things I can do for you.\n\nAnd don't forget to say hello to your fellow travelers in {2}.", "newUserPublicMessage": "Welcome to {1}. If you need me for anything, you can contact me via this secure channel. Just use **!help** for a list of things I can do for you.\n\nAnd don't forget to say hello to your fellow travelers in {2}.",