mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Fixed an issue with embed array not building if the color is invalid or unspecified
This commit is contained in:
@@ -20,7 +20,10 @@ public sealed record SmartEmbedArrayElementText : SmartEmbedTextBase
|
|||||||
protected override EmbedBuilder GetEmbedInternal()
|
protected override EmbedBuilder GetEmbedInternal()
|
||||||
{
|
{
|
||||||
var embed = base.GetEmbedInternal();
|
var embed = base.GetEmbedInternal();
|
||||||
return embed.WithColor(Rgba32.ParseHex(Color).ToDiscordColor());
|
if (Rgba32.TryParseHex(Color, out var color))
|
||||||
|
return embed.WithColor(color.ToDiscordColor());
|
||||||
|
|
||||||
|
return embed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user