예제 #1
0
        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);
        }
예제 #2
0
 public void GetDogPhoto()
 {
     Assert.IsTrue(MiscService.GetDogPhotoAsync().Result.Status == "success");
 }