public async Task InternalDapiCommand(string tag, Searches.Searches.DapiSearchType type) { tag = tag?.Trim() ?? ""; var url = await Searches.Searches.InternalDapiSearch(tag, type).ConfigureAwait(false); if (url == null) { await ReplyErrorLocalized("not_found").ConfigureAwait(false); } else { await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() .WithDescription(Context.User + " " + tag) .WithImageUrl(url) .WithFooter(efb => efb.WithText(type.ToString()))).ConfigureAwait(false); } }
public async Task InternalDapiCommand(IUserMessage umsg, string tag, Searches.Searches.DapiSearchType type) { var channel = umsg.Channel; tag = tag?.Trim() ?? ""; var url = await Searches.Searches.InternalDapiSearch(tag, type).ConfigureAwait(false); if (url == null) { await channel.SendErrorAsync(umsg.Author.Mention + " " + GetText("no_results")); } else { await channel.EmbedAsync(new EmbedBuilder().WithOkColor() .WithDescription(umsg.Author.Mention + " " + tag) .WithImageUrl(url) .WithFooter(efb => efb.WithText(type.ToString()))).ConfigureAwait(false); } }