poke/src/lyrics.js

15 lines
326 B
JavaScript
Raw Normal View History

2022-08-15 11:55:41 +02:00
const fetch = require("node-fetch");
2022-03-06 17:19:13 +01:00
2022-08-15 11:55:41 +02:00
async function main(e = "", d = "") {
const lyrics = await fetch(
`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;