4cuck fix

This commit is contained in:
lolcat 2025-01-11 21:06:45 -05:00
parent 93f685e58b
commit 596725043a
1 changed files with 8 additions and 2 deletions

View File

@ -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);
}