From fa4a4d611de72b13ec1bdb5ac43bef934c088774 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 27 Oct 2018 10:40:48 +1100 Subject: [PATCH] BUGFIX: dialog defaults to the command --- Librarian/librarian.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Librarian/librarian.js b/Librarian/librarian.js index c7697be..1c1d1c4 100644 --- a/Librarian/librarian.js +++ b/Librarian/librarian.js @@ -27,7 +27,7 @@ dialog = function(baseDialog) { let result = baseDialog(key, ...data); if (result === "") { - return "No result for \"" + key + "\""; + return baseDialog("unknown"); } return result; } @@ -109,7 +109,7 @@ function processBasicCommands(client, message) { return true; default: - shared.SendPublicMessage(client, message.author, message.channel, dialog("unknown")); + shared.SendPublicMessage(client, message.author, message.channel, dialog(command)); return true; }