From fe38841bf630fbb626d105d2b3ad62120929dc55 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 12 Aug 2024 22:34:29 +0200 Subject: [PATCH] fix: synced lyrics (#143) Reviewed-on: https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/pulls/143 Co-authored-by: Mylloon Co-committed-by: Mylloon --- src/commands/music/lyrics.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/commands/music/lyrics.ts b/src/commands/music/lyrics.ts index 639ee59..981ce9d 100644 --- a/src/commands/music/lyrics.ts +++ b/src/commands/music/lyrics.ts @@ -120,12 +120,14 @@ export default { return await interaction.followUp(`❌ | ${loc.get("c_lyrics1")}`); } - if (data === null || !data[0].syncedLyrics) { - return await interaction.followUp(`❌ | ${loc.get("c_lyrics3")} \`${request}\``); + if (data === null || !data[0] || !data[0].syncedLyrics) { + return await interaction.followUp( + `❌ | ${loc.get("c_lyrics3")} \`${queue.currentTrack?.cleanTitle}\``, + ); } // Load lyrics - const syncedLyrics = queue?.syncedLyrics(data[0]); + const syncedLyrics = queue.syncedLyrics(data[0]); syncedLyrics?.onChange(async (lyrics) => { await interaction.channel?.send({