4cuck fix
This commit is contained in:
parent
93f685e58b
commit
596725043a
10
client.js
10
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue