1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 03:14:40 -05:00

add try and catch to about section owo :3

This commit is contained in:
Ashley 2023-03-26 12:31:06 +00:00
parent 517f67958c
commit 18d303abd9

View file

@ -122,11 +122,6 @@ async function video(v) {
var a = ""; var a = "";
} }
const summary = await wiki
.summary(vid.author + " ")
.then((summary_) =>
summary_.title !== "Not found." ? summary_ : "none"
);
desc = a.Channel?.Contents?.ItemSection?.About?.Description; desc = a.Channel?.Contents?.ItemSection?.About?.Description;
@ -135,6 +130,13 @@ async function video(v) {
const nightlyJsonData = getJson(nightlyRes); const nightlyJsonData = getJson(nightlyRes);
try { try {
const summary = await wiki
.summary(vid.author + " ")
.then((summary_) =>
summary_.title !== "Not found." ? summary_ : "none"
);
const headers = {}; const headers = {};
var { data } = await curly.get(`${config.tubeApi}video?v=${v}`, { var { data } = await curly.get(`${config.tubeApi}video?v=${v}`, {