fix default lyrics

This commit is contained in:
frostice482 2024-12-13 12:32:37 +07:00
parent 09f8822778
commit 417876306a

View File

@ -63,8 +63,8 @@ async function getLyric({ client, guild, member }, query) {
} }
const node = player.node; const node = player.node;
const baseUrl = (node.options.port !== 80 && node.options.secure) const baseUrl = (node.options.port !== 80 && node.options.secure)
? `https://${node.options.host}:${node.options.port}` ? `https://${node.options.host}:${node.options.port}`
: `http://${node.options.host}:${node.options.port}`; : `http://${node.options.host}:${node.options.port}`;
// Try default lyrics endpoint first // Try default lyrics endpoint first
@ -76,7 +76,7 @@ async function getLyric({ client, guild, member }, query) {
if (defaultRes.ok) { if (defaultRes.ok) {
lyrics = await defaultRes.json(); lyrics = await defaultRes.json();
if (lyrics && (lyrics.lyrics || lyrics.lines)) { if (lyrics) {
return createLyricsEmbed(lyrics, member, track); return createLyricsEmbed(lyrics, member, track);
} }
} }