Esempio n. 1
0
        public async Task CatPic(CommandContext ctx)
        {
            var results = CatService.GetCatPhotoAsync().Result;

            if (string.IsNullOrWhiteSpace(results))
            {
                await BotServices.SendEmbedAsync(ctx, "Connection to random.cat failed!", EmbedType.Warning).ConfigureAwait(false);
            }
            var output = new DiscordEmbedBuilder()
                         .WithImageUrl(results)
                         .WithColor(DiscordColor.Orange);
            await ctx.RespondAsync(embed : output.Build()).ConfigureAwait(false);
        }