From ee3e2b33b80a24e9da8fe8bd9bb8b140caf140cd Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Thu, 26 Jan 2023 22:54:33 -0700 Subject: [PATCH] . --- src/lib/commandDispatcher.js | 2 +- src/modules/utility.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/commandDispatcher.js b/src/lib/commandDispatcher.js index ccc5585..c32a0e3 100644 --- a/src/lib/commandDispatcher.js +++ b/src/lib/commandDispatcher.js @@ -105,7 +105,7 @@ async function runCommand(msg, cmd, line) { return ret; } } catch (err) { - logger.error("hf:cmd:" + cmd, err); + logger.error("hf:cmd:" + cmd, err + "\n" + err.stack); return ":warning: An internal error occurred."; } } diff --git a/src/modules/utility.js b/src/modules/utility.js index 786ebaf..3dad460 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -276,6 +276,8 @@ lookupinvite.callback = async function (msg, line) { return "No arguments passed."; } + line = line.replace(/(https?:\/\/)?discord\.gg\//, ""); + const invite = await hf.bot.requestHandler.request({ method: "GET", path: `/invites/${line}?with_counts=1`,