feat: assume images contain cats if error
willow hai@wlo.moe
Wed, 16 Jul 2025 18:43:31 +0100
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
src/events/messageCreate.ts
→
src/events/messageCreate.ts
@@ -73,7 +73,7 @@ results[id] = { image: attachment, isCat: hasCat };
logger.debug(`image ${attachment.name}: cat detected = ${hasCat}`); } catch (error) { logger.error(`error processing image ${attachment.name}:`, error); - results[id] = { image: attachment, isCat: false }; + results[id] = { image: attachment, isCat: true }; } }@@ -121,9 +121,9 @@
if (nonCatImages.length > 0) { const replyContent = [ "this channel is only for cat images!", - ...(allResults.length > 1 - ? [`i found ${nonCatImages.length} non-cat images:`] - : []), + allResults.length > 1 + ? `i found ${nonCatImages.length} non-cat images:` + : "", ].join(" "); await message.reply({ content: replyContent,