Example #1
0
        public async Task GetMamaJokeAsync()
        {
            var request  = HttpBuilder.BuildRequest("http://api.yomomma.info/");
            var response = HttpBuilder.MakeRequest(request);
            var joke     = HttpBuilder.ReadYoMamaJokeResponse(response);

            await ReplyAsync(joke);
        }
Example #2
0
        public async Task GetPepeAsync()
        {
            var request  = HttpBuilder.BuildRequest($"https://www.reddit.com/r/pepe/random/.json?count=1");
            var response = HttpBuilder.MakeRequest(request);
            var data     = HttpBuilder.ReadRedditResponse(response);

            data.url = WebsiteLinkFixer.ImgurFixUrl(data.url);

            var builder = CustomEmbedBuilder.RedditEmbed(data, Context);

            await ReplyAsync("", false, builder.Build());

            if (string.IsNullOrEmpty(builder.ImageUrl))
            {
                await ReplyAsync(data.url);
            }
        }