fix(bot): properly check description presence in CV2 cards

This commit is contained in:
Iris System 2025-09-08 13:30:31 +12:00
parent ceedf8a327
commit 21ec6ce022

View file

@ -119,7 +119,7 @@ public class EmbedService
}
List<MessageComponent> descComponents = [];
if (system.DescriptionFor(ctx) is { } desc)
if (system.DescriptionFor(ctx) is { } desc && !string.IsNullOrWhiteSpace(desc))
{
descComponents.Add(new()
{
@ -405,7 +405,7 @@ public class EmbedService
}
List<MessageComponent> descComponents = [];
if (member.DescriptionFor(ctx) is { } desc)
if (member.DescriptionFor(ctx) is { } desc && !string.IsNullOrWhiteSpace(desc))
{
descComponents.Add(new()
{
@ -595,7 +595,7 @@ public class EmbedService
}
List<MessageComponent> descComponents = [];
if (target.DescriptionFor(pctx) is { } desc)
if (target.DescriptionFor(pctx) is { } desc && !string.IsNullOrWhiteSpace(desc))
{
descComponents.Add(new()
{