Example #1
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);
            }
        }