/// <summary> /// Builds an embed with the attributes specified by the emoji enum. /// </summary> /// <param name="EmbedBuilder">The EmbedBuilder which you wish to be built upon.</param> /// <param name="Thumbnails">The type of EmbedBuilder you wish it to be, specified by an enum of possibilities.</param> /// <param name="BotConfiguration">The BotConfiguration which is used to find the thumbnail of the embed.</param> /// <returns>The built embed, with the thumbnail and color applied.</returns> public static EmbedBuilder BuildEmbed(this EmbedBuilder EmbedBuilder, EmojiEnum Thumbnails, BotConfiguration BotConfiguration) { Color Color = Thumbnails switch { EmojiEnum.Annoyed => Color.Red, EmojiEnum.Love => Color.Green, EmojiEnum.Sign => Color.Blue, EmojiEnum.Wut => Color.Teal, EmojiEnum.Unknown => Color.Orange, _ => Color.Magenta }; return(EmbedBuilder.WithThumbnailUrl(BotConfiguration.ThumbnailURLs[(int)Thumbnails]).WithColor(Color)); }
/// <summary> /// The Build Embed method is a generic method that simply calls upon the EMBED BUILDER extension method. /// </summary> /// <param name="Thumbnail">The thumbnail that you would like to be applied to the embed.</param> /// <returns>A new embed builder with the specified attributes applied to the embed.</returns> public EmbedBuilder BuildEmbed(EmojiEnum Thumbnail) { return(new EmbedBuilder().BuildEmbed(Thumbnail, BotConfiguration)); }