public static Embed GetEmbedMessage(string messageTitle, string fieldTitle, string fieldContents, SocketUser user, EmbedFooterBuilder fb = null) { EmbedBuilder eb = new EmbedBuilder(); if (user != null) { if (fb == null && user != null) { fb = new EmbedFooterBuilder(); fb.WithText(PremiumUtils.SelectFooterEmbedText(user));; fb.WithIconUrl(user.GetAvatarUrl()); } eb.WithTitle($"{messageTitle}"); eb.AddField($"{fieldTitle}", $"{fieldContents}"); eb.WithColor(PremiumUtils.SelectEmbedColour(user)); eb.WithFooter(fb); return(eb.Build()); } else { eb.WithTitle($"{messageTitle}"); eb.AddField($"{fieldTitle}", $"{fieldContents}"); eb.WithColor(Color.Red); eb.WithFooter(fb); return(eb.Build()); } }
public static EmbedFooterBuilder GetFooter(SocketUser user, Stopwatch sw) { EmbedFooterBuilder fb = new EmbedFooterBuilder(); fb.WithText(PremiumUtils.SelectFooterEmbedText(user, sw)); fb.WithIconUrl(user.GetAvatarUrl()); return(fb); }