From c0d52812348e432fa1b636cd95ffb062f4f3ee1c Mon Sep 17 00:00:00 2001 From: Justin Oro Date: Fri, 11 Sep 2026 13:19:59 -0700 Subject: [PATCH] Add correct map path for the forest --- index.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/index.js b/index.js index 67c84dd..cb12415 100644 --- a/index.js +++ b/index.js @@ -83,14 +83,6 @@ function stripHtml(text) { return (text || "").replace(/<\/?[^>]+(>|$)/g, ""); } -const MAP_SITE_PATTERN = /mapgenie\.io/i; - -function findMapLink(results) { - if (!results) return null; - const hit = results.find((r) => r.url && MAP_SITE_PATTERN.test(r.url)); - return hit ? hit.url : null; -} - function loadGameMaps() { try { const parsed = JSON.parse(fs.readFileSync(MAPS_PATH, "utf8")); @@ -1674,8 +1666,7 @@ async function handleWiki(message, query) { : await askAI(query, history, displayName, allFacts, searchResults); if (aiReply) { const knownMap = findKnownGameMap(query); - const mapLink = findMapLink(searchResults && searchResults.results) || - (knownMap ? appendMapSearch(knownMap.url, extractMapSearchTerm(query, knownMap.name)) : null); + const mapLink = knownMap ? appendMapSearch(knownMap.url, extractMapSearchTerm(query, knownMap.name)) : null; const content = aiReply + "\n\n🗺️ Map: " + (mapLink ? "[mapgenie.io](<" + mapLink + ">)" : "Not found."); await message.reply(content); rememberAiExchange(message.author.id, query, aiReply);