From 65fb97da895bc38cb4c31197367034bd472660a1 Mon Sep 17 00:00:00 2001 From: Douglas Wade Date: Sun, 28 Jan 2024 12:39:57 -0800 Subject: [PATCH] feat(#19): Log and return early if community is not found --- main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.js b/main.js index bbe6e24..74d4097 100644 --- a/main.js +++ b/main.js @@ -316,6 +316,11 @@ const bot = new LemmyBot.LemmyBot({ name: community, instance: instance, }); + + if (!communityId) { + console.error(`Could not find community ${community} on instance ${instance}`); + return; + } let title = item.title; title = parseTags(title);