mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	Full support for embed arrays in .greet/.bye, .say and other commands which use embeds
- Website to create them is live at eb2.nadeko.bot (it will soon be replacing eb.nadeko.bot) - Embed arrays don't have a plainText property (it's renamed to 'content') - Embed arrays use color hex values instead of an integer - Old embed format will still work - There shouldn't be any breaking changes
This commit is contained in:
		@@ -26,7 +26,7 @@ public static class Extensions
 | 
			
		||||
            SmartEmbedTextArray set => msg.ModifyAsync(x =>
 | 
			
		||||
            {
 | 
			
		||||
                x.Embeds = set.GetEmbedBuilders().Map(eb => eb.Build());
 | 
			
		||||
                x.Content = set.PlainText?.SanitizeMentions() ?? "";
 | 
			
		||||
                x.Content = set.Content?.SanitizeMentions() ?? "";
 | 
			
		||||
            }),
 | 
			
		||||
            SmartPlainText spt => msg.ModifyAsync(x =>
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ public static class MessageChannelExtensions
 | 
			
		||||
        {
 | 
			
		||||
            SmartEmbedText set => channel.SendAsync(set.PlainText, set.GetEmbed().Build(), sanitizeAll: sanitizeAll),
 | 
			
		||||
            SmartPlainText st => channel.SendAsync(st.Text, null, sanitizeAll: sanitizeAll),
 | 
			
		||||
            SmartEmbedTextArray arr => channel.SendAsync(arr.PlainText,
 | 
			
		||||
            SmartEmbedTextArray arr => channel.SendAsync(arr.Content,
 | 
			
		||||
                embeds: arr.GetEmbedBuilders().Map(e => e.Build())),
 | 
			
		||||
            _ => throw new ArgumentOutOfRangeException(nameof(text))
 | 
			
		||||
        };
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user