From 8f9cdbe7535e4314275edd2af4df2445c436e8d6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 12 Aug 2024 23:15:04 +0200 Subject: [PATCH] fix lyrics (#144) dont crash when there is not lyrics Reviewed-on: https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/pulls/144 Co-authored-by: Mylloon Co-committed-by: Mylloon --- src/commands/music/lyrics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/music/lyrics.ts b/src/commands/music/lyrics.ts index 981ce9d..0d13380 100644 --- a/src/commands/music/lyrics.ts +++ b/src/commands/music/lyrics.ts @@ -144,7 +144,7 @@ export default { }); } - if (data && data.length > 0) { + if (data && data.length > 0 && data[0].plainLyrics !== null) { const title = data[0]; const limit_desc = 4096; const nb_embed = Math.ceil(title.plainLyrics.length / limit_desc);