From 411d50608f37804d95431ca46c4567805f417d15 Mon Sep 17 00:00:00 2001 From: cnrad <83192247+cnrad@users.noreply.github.com> Date: Thu, 16 Sep 2021 16:16:48 -0400 Subject: [PATCH] add hideBadges param --- src/renderCard.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderCard.tsx b/src/renderCard.tsx index cf1a3bb..48eb8c2 100644 --- a/src/renderCard.tsx +++ b/src/renderCard.tsx @@ -14,6 +14,7 @@ type Parameters = { hideDiscrim?: string; hideStatus?: string; hideTimestamp?: string; + hideBadges?: string; borderRadius?: string; idleMessage?: string; }; @@ -52,6 +53,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< discrim = "show", hideStatus = "false", hideTimestamp = "false", + hideBadges = "false", borderRadius = "10px", idleMessage = "I'm not currently doing anything!"; @@ -60,6 +62,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< if (params.animated === "false") avatarExtension = "webp"; if (params.hideStatus === "true") hideStatus = "true"; if (params.hideTimestamp === "true") hideTimestamp = "true"; + if (params.hideBadges === "true") hideBadges = "true"; if (params.hideDiscrim === "true") discrim = "hide"; if (params.theme === "light") { backgroundColor = "#eee"; @@ -200,7 +203,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< } - ${flags + ${hideBadges == "true" ? '' : flags .map( v => `