Update 'src/lyrics.js'

This commit is contained in:
Ashley 2022-08-18 13:43:42 +02:00
parent c2e2736a1f
commit da2fdf7a6c

View file

@ -1,14 +1,7 @@
const fetch = require("node-fetch"); const fetch = require("node-fetch");
async function main(e = "", d = "") { async function main(e = "", d = "") {
const lyrics = await fetch( return "none"
`https://p.poketube.fun/api/lyrics?query=${e}`
).then((res) => res.json());
if (lyrics == undefined) lyrics = "Lyrics not found";
if (lyrics != undefined) {
return lyrics;
}
} }
module.exports = main; module.exports = main;