Fixed plaintext-only embeds. closes #360

This commit is contained in:
Kwoth
2022-06-14 14:26:59 +02:00
parent 050eaa48eb
commit 6bec67006c
6 changed files with 12 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
using SixLabors.ImageSharp.PixelFormats;
#nullable disable warnings
using SixLabors.ImageSharp.PixelFormats;
#nullable disable
namespace NadekoBot;
public sealed record SmartEmbedArrayElementText : SmartEmbedTextBase
@@ -37,11 +37,11 @@ public sealed record SmartEmbedText : SmartEmbedTextBase
{
}
private SmartEmbedText(IEmbed eb, string plainText = null)
private SmartEmbedText(IEmbed eb, string? plainText = null)
: base(eb)
=> (PlainText, Color) = (plainText, eb.Color?.RawValue ?? 0);
public static SmartEmbedText FromEmbed(IEmbed eb, string plainText = null)
public static SmartEmbedText FromEmbed(IEmbed eb, string? plainText = null)
=> new(eb, plainText);
protected override EmbedBuilder GetEmbedInternal()