mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	Fixed plaintext-only embeds. closes #360
This commit is contained in:
		@@ -21,7 +21,7 @@ public static class Extensions
 | 
			
		||||
        {
 | 
			
		||||
            SmartEmbedText set => msg.ModifyAsync(x =>
 | 
			
		||||
            {
 | 
			
		||||
                x.Embed = set.GetEmbed().Build();
 | 
			
		||||
                x.Embed = set.IsValid ? set.GetEmbed().Build() : null;
 | 
			
		||||
                x.Content = set.PlainText?.SanitizeMentions() ?? "";
 | 
			
		||||
            }),
 | 
			
		||||
            SmartEmbedTextArray set => msg.ModifyAsync(x =>
 | 
			
		||||
 
 | 
			
		||||
@@ -54,7 +54,7 @@ public static class MessageChannelExtensions
 | 
			
		||||
        => text switch
 | 
			
		||||
        {
 | 
			
		||||
            SmartEmbedText set => channel.SendAsync(set.PlainText,
 | 
			
		||||
                set.GetEmbed().Build(),
 | 
			
		||||
                set.IsValid ? set.GetEmbed().Build() : null,
 | 
			
		||||
                sanitizeAll: sanitizeAll),
 | 
			
		||||
            SmartPlainText st => channel.SendAsync(st.Text,
 | 
			
		||||
                default(Embed),
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ public static class SocketMessageComponentExtensions
 | 
			
		||||
        => text switch
 | 
			
		||||
        {
 | 
			
		||||
            SmartEmbedText set => smc.RespondAsync(set.PlainText,
 | 
			
		||||
                set.GetEmbed().Build(),
 | 
			
		||||
                set.IsValid ? set.GetEmbed().Build() : null,
 | 
			
		||||
                sanitizeAll: sanitizeAll,
 | 
			
		||||
                ephemeral: ephemeral),
 | 
			
		||||
            SmartPlainText st => smc.RespondAsync(st.Text,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user