public async Task GetDog(CommandContext ctx) { await ctx.TriggerTypingAsync(); var results = MiscService.GetDogPhotoAsync().Result; if (results.Status != "success") { await BotServices.SendResponseAsync(ctx, Resources.ERR_API_CONNECTION, ResponseType.Warning) .ConfigureAwait(false); return; } var output = new DiscordEmbedBuilder() .WithImageUrl(results.Message) .WithColor(DiscordColor.Brown); await ctx.RespondAsync(output.Build()).ConfigureAwait(false); }
public void GetDogPhoto() { Assert.IsTrue(MiscService.GetDogPhotoAsync().Result.Status == "success"); }