From ed67725647eff6f6575b49a397db4f6693031055 Mon Sep 17 00:00:00 2001 From: bignutty <3515180-bignutty@users.noreply.gitlab.com> Date: Mon, 9 Sep 2024 21:19:33 +0200 Subject: [PATCH] fix issue with lyric length --- commands/interaction/slash/search/lyrics.js | 2 +- commands/message/search/lyrics.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/interaction/slash/search/lyrics.js b/commands/interaction/slash/search/lyrics.js index 82d8d77..4d904aa 100644 --- a/commands/interaction/slash/search/lyrics.js +++ b/commands/interaction/slash/search/lyrics.js @@ -105,7 +105,7 @@ module.exports = { for(const f of search.body.lyrics.split('\n\n')){ fields.push({ name: '​', - value: f.substr(0,1024).replace(/\[(.*?)\]/g,"-# [$1]"), + value: f.replace(/\[(.*?)\]/g,"-# [$1]").substr(0,1024), inline: false }) } diff --git a/commands/message/search/lyrics.js b/commands/message/search/lyrics.js index f2255bb..f4e6493 100644 --- a/commands/message/search/lyrics.js +++ b/commands/message/search/lyrics.js @@ -91,7 +91,7 @@ module.exports = { for(const f of search.body.lyrics.split('\n\n')){ fields.push({ name: '​', - value: f.substr(0,1024).replace(/\[(.*?)\]/g,"-# [$1]"), + value: f.replace(/\[(.*?)\]/g,"-# [$1]").substr(0,1024), inline: false }) }