public async Task NASA(CommandContext ctx) { var results = await NASAService.GetNASAImageAsync().ConfigureAwait(false); if (results is null) { await BotServices.SendEmbedAsync(ctx, Resources.ERR_NASA_API, EmbedType.Missing).ConfigureAwait(false); } else { var output = new DiscordEmbedBuilder() .WithTitle(results.Title) .WithImageUrl(results.ImageHD ?? results.ImageSD) .WithFooter(results.Description) .WithColor(new DiscordColor("#0B3D91")); await ctx.RespondAsync(embed : output.Build()).ConfigureAwait(false); } }
public void GetNASAData() { Assert.IsNotNull(NASAService.GetNASAImageAsync().Result); }