music: fix yt info not being json'd

This commit is contained in:
Cynthia Foxwell 2023-09-12 22:30:32 -06:00
parent 1ee1cafbb4
commit 026047a7c9
1 changed files with 3 additions and 1 deletions

View File

@ -217,7 +217,9 @@ async function enqueue({
id = uri.searchParams.get("v"); id = uri.searchParams.get("v");
} }
} }
info = await fetch(`${hf.config.piped_api}/streams/${id}`); info = await fetch(`${hf.config.piped_api}/streams/${id}`).then((res) =>
res.json()
);
} catch (err) { } catch (err) {
await textChannel.createMessage({ await textChannel.createMessage({
content: `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``, content: `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``,