From 596725043a82d47ab5da24cab83c3460c9be2d53 Mon Sep 17 00:00:00 2001 From: lolcat Date: Sat, 11 Jan 2025 21:06:45 -0500 Subject: [PATCH] 4cuck fix --- client.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client.js b/client.js index dffdd19..75141a8 100644 --- a/client.js +++ b/client.js @@ -828,13 +828,19 @@ deek.on("message", async function(msg, user){ var res = await fetch("https://a.4cdn.org/" + chan4 + ".json"); var json = await res.json(); - if(typeof json.posts[0].sub == "undefined"){ + if(typeof json.posts[0] == "undefined"){ var title = "404 thread ded"; var description = "stupid fucking thread fuck this stupid site"; }else{ - var title = json.posts[0].sub; + if(typeof json.posts[0].sub == "undefined"){ + + var title = "No thread title"; + }else{ + + var title = json.posts[0].sub; + } var description = removehtml(json.posts[0].com); }