all repos — stealth-developers @ 0258e5a680a0b1e43c79999e30b1fdf3f947434f

feat: assume images contain cats if error
willow hai@wlo.moe
Wed, 16 Jul 2025 18:43:31 +0100
commit

0258e5a680a0b1e43c79999e30b1fdf3f947434f

parent

e267157017b7c7a29e1d1de4ed914f1e40a1c2e9

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/events/messageCreate.tssrc/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,