From e033e48244d80a1d0f52ab211c16bd3a2ced048d Mon Sep 17 00:00:00 2001 From: Brian Le Date: Mon, 6 Nov 2023 04:25:51 +0000 Subject: [PATCH] Truncate bookmark embed titles --- src/helpers/discord_utils.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/helpers/discord_utils.ts b/src/helpers/discord_utils.ts index 6f5304fdb..de186de4c 100644 --- a/src/helpers/discord_utils.ts +++ b/src/helpers/discord_utils.ts @@ -1611,13 +1611,16 @@ export async function sendBookmarkedSongs( inline: boolean; }> = [...songs].map((bookmarkedSong) => ({ name: `${bold( - `"${getLocalizedSongName( - bookmarkedSong[1].song, - locale, - )}" - ${getLocalizedArtistName( - bookmarkedSong[1].song, - locale, - )}`, + truncatedString( + `"${getLocalizedSongName( + bookmarkedSong[1].song, + locale, + )}" - ${getLocalizedArtistName( + bookmarkedSong[1].song, + locale, + )}`, + 256, + ), )} (${standardDateFormat(bookmarkedSong[1].song.publishDate)})`, value: `[${friendlyFormattedNumber( bookmarkedSong[1].song.views,