mirror of
https://github.com/Ratstail91/SANCTUM.git
synced 2025-11-29 02:24:27 +11:00
Moved the help and lore dialog to the faction leaders
This commit is contained in:
14
ADAM/adam.js
14
ADAM/adam.js
@@ -14,7 +14,7 @@ let shared = require("../Shared/shared");
|
||||
//dialog system
|
||||
let dialog = shared.GenerateDialogFunction(require("./dialog.json"));
|
||||
|
||||
//ADAM dialog decorator
|
||||
//dialog decorator
|
||||
dialog = function(baseDialog) {
|
||||
return function(key, ...data) {
|
||||
if ( (key === "help" || key === "lore") && typeof(data[0]) !== "undefined") {
|
||||
@@ -27,7 +27,7 @@ dialog = function(baseDialog) {
|
||||
let result = baseDialog(key, ...data);
|
||||
|
||||
if (result === "") {
|
||||
return "No result for \"" + key + "\"";
|
||||
return dialog("noResult", key);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -152,16 +152,6 @@ function processBasicCommands(client, message) {
|
||||
message.delete(1000);
|
||||
}
|
||||
return true;
|
||||
|
||||
case "help":
|
||||
case "lore":
|
||||
shared.SendPublicMessage(client, message.author, message.channel, dialog(command, args[0]));
|
||||
return true;
|
||||
|
||||
//DEBUGGING
|
||||
case "debugxp":
|
||||
shared.AddXP(client, message.author, args[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -92,5 +92,7 @@
|
||||
"loreSanctum": "TODO: Sorry. I recognize the term but am unable to process the request. There is a corruption in my cognitive core. Try again soon.",
|
||||
"loreLibrarian": "WARNING: DATA CORRUPTED",
|
||||
"loreCodex": "WARNING: DATA CORRUPTED",
|
||||
"loreFactions": "TODO: Sorry. I recognize the term but am unable to process the request. There is a corruption in my cognitive core. Try again soon."
|
||||
"loreFactions": "TODO: Sorry. I recognize the term but am unable to process the request. There is a corruption in my cognitive core. Try again soon.",
|
||||
|
||||
"noResult": "No result for \"{1}\""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user