private EmbedBuilder APISpellFailure(ScryFallAutoCompleteModel entry, string nameGiven) { EmbedBuilder MTGFailure = new EmbedBuilder(); MTGFailure.WithColor(failedColor); MTGFailure.WithFooter(failedFooter); MTGFailure.AddField("Incorrect Spelling: ", "Make sure to correctly type the name of the card you'd like to look up.", true); if (entry != null) { string names = ""; foreach (var name in entry.data) { names += $"{name}\n"; } MTGFailure.AddField($"Did You Mean?", names); if (nameGiven != null) { MTGFailure.Title = $"Card Lookup Failed. Name Provided: {nameGiven}"; } else { MTGFailure.Title = "Card Lookup Failed."; } } return(MTGFailure); }
public EmbedBuilder DetermineFailure(int num, ScryFallAutoCompleteModel entry = null, string entryValue = null) { switch (num) { default: return(GenericError()); case 0: return(APISpellFailure(entry, entryValue)); } }