From db2bd2029d600d59cd847d99bbf4afb4507c73c7 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Thu, 7 Apr 2022 16:53:25 +0100 Subject: [PATCH] fix: profile command sending empty strings is illegal --- bot/src/utils/embeds.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/src/utils/embeds.ts b/bot/src/utils/embeds.ts index c2cbafc64..f46c6a023 100644 --- a/bot/src/utils/embeds.ts +++ b/bot/src/utils/embeds.ts @@ -78,14 +78,14 @@ export function CreateGameProfileEmbed(userDoc: PublicUserDocument, ugptStats: U Entries(ugptStats.rankingData) .map( ([k, v]) => - `**${k}**: #${v.ranking}/${v.outOf} (${FormatProfileRating( + `**${UppercaseFirst(k)}**: #${v.ranking}/${v.outOf} (${FormatProfileRating( game, playtype, k, ugptStats.gameStats.ratings[k] )})` ) - .join("\n"), + .join("\n") || "No Rankings", true ) .addField( @@ -95,7 +95,7 @@ export function CreateGameProfileEmbed(userDoc: PublicUserDocument, ugptStats: U ([k, v]) => `**${UppercaseFirst(k)}**: ${gptConfig.classHumanisedFormat[k][v].display}` ) - .join("\n"), + .join("\n") || "No Classes", true ) .addField("Playcount", ugptStats.totalScores.toString())